Skip to content

Commit f9395ea

Browse files
GiteaBotlunnydelvh
authored
Add protected branch name description (#27257) (#27351)
Backport #27257 by @lunny Co-authored-by: Lunny Xiao <[email protected]> Co-authored-by: delvh <[email protected]>
1 parent f13a294 commit f9395ea

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

options/locale/locale_en-US.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2305,6 +2305,7 @@ settings.dismiss_stale_approvals_desc = When new commits that change the content
23052305
settings.require_signed_commits = Require Signed Commits
23062306
settings.require_signed_commits_desc = Reject pushes to this branch if they are unsigned or unverifiable.
23072307
settings.protect_branch_name_pattern = Protected Branch Name Pattern
2308+
settings.protect_branch_name_pattern_desc = "Protected branch name patterns. See <a href="github.com/gobwas/glob">the documentation</a> for pattern syntax. Examples: main, release/**"
23082309
settings.protect_patterns = Patterns
23092310
settings.protect_protected_file_patterns = "Protected file patterns (separated using semicolon ';'):"
23102311
settings.protect_protected_file_patterns_desc = "Protected files are not allowed to be changed directly even if user has rights to add, edit, or delete files in this branch. Multiple patterns can be separated using semicolon (';'). See <a href='https://pkg.go.dev/github.com/gobwas/glob#Compile'>github.com/gobwas/glob</a> documentation for pattern syntax. Examples: <code>.drone.yml</code>, <code>/docs/**/*.txt</code>."

templates/repo/settings/protected_branch.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<label>{{ctx.Locale.Tr "repo.settings.protect_branch_name_pattern"}}</label>
1111
<input name="rule_name" type="text" value="{{.Rule.RuleName}}">
1212
<input name="rule_id" type="hidden" value="{{.Rule.ID}}">
13+
<p class="help gt-ml-0">{{ctx.Locale.Tr "repo.settings.protect_branch_name_pattern_desc" | Safe}}</p>
1314
</div>
1415
<div class="field">
1516
<label>{{ctx.Locale.Tr "repo.settings.protect_protected_file_patterns"}}</label>

0 commit comments

Comments
 (0)