diff options
author | Markus Amshove <scm@amshove.dev> | 2024-02-19 21:48:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-19 20:48:17 +0000 |
commit | 78f41e4fc43cd903c95d501e40c3496689698cc4 (patch) | |
tree | 498d17e28236b83dd985ce2608a7e7bf1297761b /templates | |
parent | c01b266d8680a270b1e8067e757ed25be38eea24 (diff) | |
download | gitea-78f41e4fc43cd903c95d501e40c3496689698cc4.tar.gz gitea-78f41e4fc43cd903c95d501e40c3496689698cc4.zip |
Disallow merge when required checked are missing (#29143) (#29268)
backport #29143
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/pulls/status.tmpl | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/templates/repo/pulls/status.tmpl b/templates/repo/pulls/status.tmpl index 476b89a425..513ec98073 100644 --- a/templates/repo/pulls/status.tmpl +++ b/templates/repo/pulls/status.tmpl @@ -1,7 +1,7 @@ {{if $.LatestCommitStatus}} {{if not $.Issue.PullRequest.HasMerged}} <div class="ui top attached header"> - {{if eq .LatestCommitStatus.State "pending"}} + {{if or (eq .LatestCommitStatus.State "pending") (.MissingRequiredChecks)}} {{ctx.Locale.Tr "repo.pulls.status_checking"}} {{else if eq .LatestCommitStatus.State "success"}} {{ctx.Locale.Tr "repo.pulls.status_checks_success"}} @@ -14,7 +14,7 @@ {{else}} {{ctx.Locale.Tr "repo.pulls.status_checking"}} {{end}} - </div> + </div> {{end}} {{range $.LatestCommitStatuses}} @@ -31,4 +31,15 @@ </div> </div> {{end}} + {{range .MissingRequiredChecks}} + <div class="ui attached segment pr-status"> + {{svg "octicon-dot-fill" 18 "commit-status icon text yellow"}} + <div class="status-context"> + <span>{{.}}</span> + <div class="ui status-details"> + <div class="ui label">{{ctx.Locale.Tr "repo.pulls.status_checks_requested"}}</div> + </div> + </div> + </div> + {{end}} {{end}} |