|
73 | 73 | {{- else if .IsBlockedByOutdatedBranch}}red
|
74 | 74 | {{- else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsFailure .RequiredStatusCheckState.IsError)}}red
|
75 | 75 | {{- else if and .EnableStatusCheck (or (not $.LatestCommitStatus) .RequiredStatusCheckState.IsPending .RequiredStatusCheckState.IsWarning)}}yellow
|
76 |
| - {{- else if and .RequireSigned (not .WillSign)}}red |
| 76 | + {{- else if and .AllowMerge .RequireSigned (not .WillSign)}}red |
77 | 77 | {{- else if .Issue.PullRequest.IsChecking}}yellow
|
78 | 78 | {{- else if .Issue.PullRequest.CanAutoMerge}}green
|
79 | 79 | {{- else}}red{{end}}">{{svg "octicon-git-merge" 32}}</a>
|
|
159 | 159 | <i class="icon icon-octicon">{{svg "octicon-x" 16}}</i>
|
160 | 160 | {{$.i18n.Tr "repo.pulls.required_status_check_missing"}}
|
161 | 161 | </div>
|
162 |
| - {{else if and .RequireSigned (not .WillSign)}} |
| 162 | + {{else if and .AllowMerge .RequireSigned (not .WillSign)}} |
163 | 163 | <div class="item text red">
|
164 | 164 | <i class="icon icon-octicon">{{svg "octicon-x" 16}}</i>
|
165 | 165 | {{$.i18n.Tr "repo.pulls.require_signed_wont_sign"}}
|
|
170 | 170 | </div>
|
171 | 171 | {{end}}
|
172 | 172 | {{$notAllOverridableChecksOk := or .IsBlockedByApprovals .IsBlockedByRejection .IsBlockedByOutdatedBranch (and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess))}}
|
173 |
| - {{if and (or $.IsRepoAdmin (not $notAllOverridableChecksOk)) (or (not .RequireSigned) .WillSign)}} |
| 173 | + {{if and (or $.IsRepoAdmin (not $notAllOverridableChecksOk)) (or (not .AllowMerge) (not .RequireSigned) .WillSign)}} |
174 | 174 | {{if $notAllOverridableChecksOk}}
|
175 | 175 | <div class="item text yellow">
|
176 | 176 | <i class="icon icon-octicon">{{svg "octicon-dot-fill" 16}}</i>
|
|
216 | 216 | </div>
|
217 | 217 | {{end}}
|
218 | 218 |
|
219 |
| - {{if and (or $.IsRepoAdmin (not $notAllOverridableChecksOk)) (or (not .RequireSigned) .WillSign)}} |
| 219 | + {{if and (or $.IsRepoAdmin (not $notAllOverridableChecksOk)) (or (not .AllowMerge) (not .RequireSigned) .WillSign)}} |
220 | 220 | {{if .AllowMerge}}
|
221 | 221 | {{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}}
|
222 | 222 | {{$approvers := .Issue.PullRequest.GetApprovers}}
|
|
0 commit comments