Skip to content

Commit 02eb4b1

Browse files
authored
Disable status checks in template if none found (#20088)
Signed-off-by: jolheiser <[email protected]>
1 parent d789d36 commit 02eb4b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/repo/settings/protected_branch.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127

128128
<div class="field">
129129
<div class="ui checkbox">
130-
<input class="enable-statuscheck" name="enable_status_check" type="checkbox" data-target="#statuscheck_contexts_box" {{if .Branch.EnableStatusCheck}}checked{{end}}>
130+
<input class="enable-statuscheck" name="enable_status_check" type="checkbox" data-target="#statuscheck_contexts_box" {{if eq (len .branch_status_check_contexts) 0}}disabled{{end}} {{if .Branch.EnableStatusCheck}}checked{{end}}>
131131
<label>{{.i18n.Tr "repo.settings.protect_check_status_contexts"}}</label>
132132
<p class="help">{{.i18n.Tr "repo.settings.protect_check_status_contexts_desc"}}</p>
133133
</div>

0 commit comments

Comments
 (0)