diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-09-18 13:39:45 +0800 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-09-18 08:39:45 +0300 |
commit | 04ca7f004710de2b408f558f6f148894aa61ba57 (patch) | |
tree | 57fea3b9853127897676faaf9e70abace2565878 /templates/repo/settings | |
parent | 29454733b4eeea33e6c94c50b32855066c203988 (diff) | |
download | gitea-04ca7f004710de2b408f558f6f148894aa61ba57.tar.gz gitea-04ca7f004710de2b408f558f6f148894aa61ba57.zip |
Refuse merge until all required status checks success (#7481)
* refuse merge until ci successfully
* deny merge request when required status checkes not succeed on merge Post and API
* add database migration for added columns on protected_branch
* fix migration
* fix protected branch check bug
* fix protected branch settings
* remove duplicated code on check pull request's required commit statuses pass
* remove unused codes
* fix migration
* add newline for template file
* fix go mod
* rename function name and some other fixes
* fix template
* fix bug pull view
* remove go1.12 wrong dependencies
* add administrator bypass when protected branch status check enabled
* fix bug
* improve the codes
Diffstat (limited to 'templates/repo/settings')
-rw-r--r-- | templates/repo/settings/protected_branch.tmpl | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/templates/repo/settings/protected_branch.tmpl b/templates/repo/settings/protected_branch.tmpl index 066350f97a..067d1d9761 100644 --- a/templates/repo/settings/protected_branch.tmpl +++ b/templates/repo/settings/protected_branch.tmpl @@ -105,6 +105,38 @@ </div> <div class="field"> + <div class="ui checkbox"> + <input class="enable-statuscheck" name="enable_status_check" type="checkbox" data-target="#statuscheck_contexts_box" {{if .Branch.EnableStatusCheck}}checked{{end}}> + <label>{{.i18n.Tr "repo.settings.protect_check_status_contexts"}}</label> + <p class="help">{{.i18n.Tr "repo.settings.protect_check_status_contexts_desc"}}</p> + </div> + </div> + + <div id="statuscheck_contexts_box" class="fields {{if not .Branch.EnableStatusCheck}}disabled{{end}}"> + <div class="field"> + <table class="ui celled table six column"> + <thead> + <tr><th> + {{.i18n.Tr "repo.settings.protect_check_status_contexts_list"}} + </th> + </tr> + </thead> + <tbody> + {{range $.branch_status_check_contexts}} + <tr><td> + <span class="ui checkbox"> + <input class="enable-whitelist" name="status_check_contexts" value="{{.}}" type="checkbox" {{if $.is_context_require}}{{if call $.is_context_required .}}checked{{end}}{{end}}> + </span> + {{.}} + {{if $.is_context_required}}{{if call $.is_context_required .}}<div class="ui label right">Required</div>{{end}}{{end}} + </td></tr> + {{end}} + </tbody> + </table> + </div> + </div> + + <div class="field"> <label for="required-approvals">{{.i18n.Tr "repo.settings.protect_required_approvals"}}</label> <input name="required_approvals" id="required-approvals" type="number" value="{{.Branch.RequiredApprovals}}"> <p class="help">{{.i18n.Tr "repo.settings.protect_required_approvals_desc"}}</p> |