diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-01-22 14:06:11 +0800 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2020-01-22 08:06:11 +0200 |
commit | 0dced15c1a7f984f5a363c10853f9348c9b39aa9 (patch) | |
tree | eb016608230745bf248f41c734ae9aa53714b8e5 /templates/repo | |
parent | db9342c8540fdea3fe135b97886ec0752689d8d5 (diff) | |
download | gitea-0dced15c1a7f984f5a363c10853f9348c9b39aa9.tar.gz gitea-0dced15c1a7f984f5a363c10853f9348c9b39aa9.zip |
Fix wrong hint when status checking is running on pull request view (#9886) (#9928)
* Fix wrong hint when status checking is running on pull request view
* fix lint
* fix test
* fix test
* fix wrong tmpl
* fix import
* rename function name
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/issue/view_content/pull.tmpl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl index 2dc76dcf2e..72ec470249 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull.tmpl @@ -42,7 +42,8 @@ {{else if .IsPullRequestBroken}}red {{else if .IsBlockedByApprovals}}red {{else if .IsBlockedByRejection}}red - {{else if and .EnableStatusCheck (not .IsRequiredStatusCheckSuccess)}}red + {{else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsFailure .RequiredStatusCheckState.IsError)}}red + {{else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsPending .RequiredStatusCheckState.IsWarning)}}yellow {{else if .Issue.PullRequest.IsChecking}}yellow {{else if .Issue.PullRequest.CanAutoMerge}}green {{else}}red{{end}}"><span class="mega-octicon octicon-git-merge"></span></a> @@ -117,7 +118,7 @@ {{$.i18n.Tr "repo.pulls.required_status_check_failed"}} </div> {{else if .Issue.PullRequest.CanAutoMerge}} - {{if and .EnableStatusCheck (not .IsRequiredStatusCheckSuccess)}} + {{if and .EnableStatusCheck (or .RequiredStatusCheckState.IsError .RequiredStatusCheckState.IsFailure)}} <div class="item text red"> <span class="octicon octicon-x"></span> {{$.i18n.Tr "repo.pulls.required_status_check_failed"}} |