1
1
mirror of https://github.com/go-gitea/gitea synced 2025-12-07 13:28:25 +00:00

Allow set branch protection in an empty repository (#32095) (#32119)

Backport #32095 by @lunny

Resolve #32093

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
Giteabot
2024-09-24 10:42:52 +08:00
committed by GitHub
parent a3c660f89a
commit 0f834f052b
3 changed files with 14 additions and 18 deletions
+1 -1
View File
@@ -1063,7 +1063,7 @@ func registerRoutes(m *web.Route) {
m.Combo("/edit").Get(repo_setting.SettingsProtectedBranch).
Post(web.Bind(forms.ProtectBranchForm{}), context.RepoMustNotBeArchived(), repo_setting.SettingsProtectedBranchPost)
m.Post("/{id}/delete", repo_setting.DeleteProtectedBranchRulePost)
}, repo.MustBeNotEmpty)
})
m.Group("/tags", func() {
m.Get("", repo_setting.ProtectedTags)