diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-01-22 11:46:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-22 11:46:04 +0800 |
commit | 81daf26878d8a7e14c172fc39fc55c36281b1898 (patch) | |
tree | 9d4d43bf2e12cdc9c56196938d0618e9577cd1b6 /templates/repo/issue | |
parent | cca13ae2acf1ef7a3b0516a8774dff0365b73697 (diff) | |
download | gitea-81daf26878d8a7e14c172fc39fc55c36281b1898.tar.gz gitea-81daf26878d8a7e14c172fc39fc55c36281b1898.zip |
Fix wrong hint when status checking is running on pull request view (#9886)
* 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/issue')
-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 e0a48442e0..32c744515c 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull.tmpl @@ -47,7 +47,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 and .RequireSigned (not .WillSign)}}}red {{else if .Issue.PullRequest.IsChecking}}yellow {{else if .Issue.PullRequest.CanAutoMerge}}green @@ -118,7 +119,7 @@ <i class="icon icon-octicon"><span class="octicon octicon-x"></span></i> {{$.i18n.Tr "repo.pulls.blocked_by_rejection"}} </div> - {{else if and .EnableStatusCheck (not .IsRequiredStatusCheckSuccess)}} + {{else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsError .RequiredStatusCheckState.IsFailure)}} <div class="item text red"> <i class="icon icon-octicon"><span class="octicon octicon-x"></span></i> {{$.i18n.Tr "repo.pulls.required_status_check_failed"}} |