From 3a9fcac11b018c0444a78a6011d13e27f278c426 Mon Sep 17 00:00:00 2001 From: Kerwin Bryant Date: Mon, 14 Apr 2025 21:41:00 +0800 Subject: [PATCH] Update protected_branch.tmpl (#34193) Show correct message for new/edit. Add "required" to rule name. --------- Co-authored-by: wxiaoguang --- templates/repo/settings/protected_branch.tmpl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/templates/repo/settings/protected_branch.tmpl b/templates/repo/settings/protected_branch.tmpl index 61cc6077a1..3c311c18c3 100644 --- a/templates/repo/settings/protected_branch.tmpl +++ b/templates/repo/settings/protected_branch.tmpl @@ -2,13 +2,17 @@

- {{ctx.Locale.Tr "repo.settings.branch_protection" .Rule.RuleName}} + {{if .Rule.RuleName}} + {{ctx.Locale.Tr "repo.settings.branch_protection" .Rule.RuleName}} + {{else}} + {{ctx.Locale.Tr "repo.settings.branches.add_new_rule"}} + {{end}}

{{ctx.Locale.Tr "repo.settings.protect_patterns"}}
-
+
- +

{{ctx.Locale.Tr "repo.settings.protect_branch_name_pattern_desc" "https://github.com/gobwas/glob"}}