mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Add tag protection manage via rest API. --------- Co-authored-by: Alexander Kogay <kogay.a@citilink.ru> Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
		| @@ -1168,6 +1168,15 @@ func Routes() *web.Route { | ||||
| 					m.Post("", reqToken(), reqRepoWriter(unit.TypeCode), mustNotBeArchived, bind(api.CreateTagOption{}), repo.CreateTag) | ||||
| 					m.Delete("/*", reqToken(), reqRepoWriter(unit.TypeCode), mustNotBeArchived, repo.DeleteTag) | ||||
| 				}, reqRepoReader(unit.TypeCode), context.ReferencesGitRepo(true)) | ||||
| 				m.Group("/tag_protections", func() { | ||||
| 					m.Combo("").Get(repo.ListTagProtection). | ||||
| 						Post(bind(api.CreateTagProtectionOption{}), mustNotBeArchived, repo.CreateTagProtection) | ||||
| 					m.Group("/{id}", func() { | ||||
| 						m.Combo("").Get(repo.GetTagProtection). | ||||
| 							Patch(bind(api.EditTagProtectionOption{}), mustNotBeArchived, repo.EditTagProtection). | ||||
| 							Delete(repo.DeleteTagProtection) | ||||
| 					}) | ||||
| 				}, reqToken(), reqAdmin()) | ||||
| 				m.Group("/actions", func() { | ||||
| 					m.Get("/tasks", repo.ListActionTasks) | ||||
| 				}, reqRepoReader(unit.TypeActions), context.ReferencesGitRepo(true)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user