From 04ca7f004710de2b408f558f6f148894aa61ba57 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 18 Sep 2019 13:39:45 +0800 Subject: 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 --- templates/repo/pulls/status.tmpl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'templates/repo/pulls') diff --git a/templates/repo/pulls/status.tmpl b/templates/repo/pulls/status.tmpl index e1401aa8bb..76a4eb5423 100644 --- a/templates/repo/pulls/status.tmpl +++ b/templates/repo/pulls/status.tmpl @@ -15,7 +15,12 @@
{{template "repo/commit_status" .}} {{.Context}} {{.Description}} -
{{if .TargetURL}}Details{{end}}
+
+ {{if $.is_context_required}} + {{if (call $.is_context_required .Context)}}
Required
{{end}} + {{end}} + {{if .TargetURL}}Details{{end}} +
{{end}} -{{end}} \ No newline at end of file +{{end}} -- cgit v1.2.3