|
43 | 43 | {{else if .IsBlockedByApprovals}}red
|
44 | 44 | {{else if .IsBlockedByRejection}}red
|
45 | 45 | {{else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsFailure .RequiredStatusCheckState.IsError)}}red
|
46 |
| - {{else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsPending .RequiredStatusCheckState.IsWarning)}}yellow |
| 46 | + {{else if and .EnableStatusCheck (or (not $.LatestCommitStatus) .RequiredStatusCheckState.IsPending .RequiredStatusCheckState.IsWarning)}}yellow |
47 | 47 | {{else if .Issue.PullRequest.IsChecking}}yellow
|
48 | 48 | {{else if .Issue.PullRequest.CanAutoMerge}}green
|
49 | 49 | {{else}}red{{end}}"><span class="mega-octicon octicon-git-merge"></span></a>
|
|
112 | 112 | <span class="octicon octicon-sync"></span>
|
113 | 113 | {{$.i18n.Tr "repo.pulls.is_checking"}}
|
114 | 114 | </div>
|
115 |
| - {{else if and (not .Issue.PullRequest.CanAutoMerge) .EnableStatusCheck (not .IsRequiredStatusCheckSuccess)}} |
| 115 | + {{else if and (not .Issue.PullRequest.CanAutoMerge) .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess)}} |
116 | 116 | <div class="item text red">
|
117 | 117 | <span class="octicon octicon-x"></span>
|
118 | 118 | {{$.i18n.Tr "repo.pulls.required_status_check_failed"}}
|
|
123 | 123 | <span class="octicon octicon-x"></span>
|
124 | 124 | {{$.i18n.Tr "repo.pulls.required_status_check_failed"}}
|
125 | 125 | </div>
|
| 126 | + {{else if and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess)}} |
| 127 | + <div class="item text red"> |
| 128 | + <span class="octicon octicon-x"></span> |
| 129 | + {{$.i18n.Tr "repo.pulls.required_status_check_missing"}} |
| 130 | + </div> |
126 | 131 | {{end}}
|
127 |
| - {{if or $.IsRepoAdmin (not .EnableStatusCheck) .IsRequiredStatusCheckSuccess}} |
128 |
| - {{if and $.IsRepoAdmin .EnableStatusCheck (not .IsRequiredStatusCheckSuccess)}} |
| 132 | + {{if or $.IsRepoAdmin (not .EnableStatusCheck) .RequiredStatusCheckState.IsSuccess}} |
| 133 | + {{if and $.IsRepoAdmin .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess)}} |
129 | 134 | <div class="item text yellow">
|
130 | 135 | <span class="octicon octicon-primitive-dot"></span>
|
131 | 136 | {{$.i18n.Tr "repo.pulls.required_status_check_administrator"}}
|
|
0 commit comments