From 7d46cb640061d01496d9487b1ff83a588b076b5f Mon Sep 17 00:00:00 2001 From: Kerwin Bryant Date: Mon, 14 Apr 2025 14:45:09 +0800 Subject: [PATCH 1/2] Update protected_branch.tmpl --- templates/repo/settings/protected_branch.tmpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/repo/settings/protected_branch.tmpl b/templates/repo/settings/protected_branch.tmpl index 61cc6077a15dc..9e465419606b5 100644 --- a/templates/repo/settings/protected_branch.tmpl +++ b/templates/repo/settings/protected_branch.tmpl @@ -2,7 +2,11 @@

- {{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"}}
From f3d51f8f1ed295f96afb7290214f0b8900637d7f Mon Sep 17 00:00:00 2001 From: Kerwin Bryant Date: Mon, 14 Apr 2025 16:21:35 +0800 Subject: [PATCH 2/2] Update protected_branch.tmpl --- templates/repo/settings/protected_branch.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/repo/settings/protected_branch.tmpl b/templates/repo/settings/protected_branch.tmpl index 9e465419606b5..3c311c18c39ee 100644 --- a/templates/repo/settings/protected_branch.tmpl +++ b/templates/repo/settings/protected_branch.tmpl @@ -10,9 +10,9 @@
{{ctx.Locale.Tr "repo.settings.protect_patterns"}}
-
+
- +

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