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

This commit is contained in:
Lunny Xiao authored and GitHub committed 2024-09-24 02:06:28 +00:00
1 parent 3f2d8f8730
commit 6eb5950835
3 files changed
+14 -18

No files matched your search

+1 -1
View File
@@ -1069,7 +1069,7 @@ func registerRoutes(m *web.Router) {
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)