@@ -73,7 +73,7 @@
{{- else if .IsBlockedByOutdatedBranch}}red
{{- else if .IsBlockedByOutdatedBranch}}red
{{- else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsFailure .RequiredStatusCheckState.IsError)}}red
{{- else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsFailure .RequiredStatusCheckState.IsError)}}red
{{- else if and .EnableStatusCheck (or (not $.LatestCommitStatus) .RequiredStatusCheckState.IsPending .RequiredStatusCheckState.IsWarning)}}yellow
{{- else if and .EnableStatusCheck (or (not $.LatestCommitStatus) .RequiredStatusCheckState.IsPending .RequiredStatusCheckState.IsWarning)}}yellow
{{- else if and .RequireSigned (not .WillSign)}}red
{{- else if and .AllowMerge . RequireSigned (not .WillSign)}}red
{{- else if .Issue.PullRequest.IsChecking}}yellow
{{- else if .Issue.PullRequest.IsChecking}}yellow
{{- else if .Issue.PullRequest.CanAutoMerge}}green
{{- else if .Issue.PullRequest.CanAutoMerge}}green
{{- else}}red{{end}}">{{svg "octicon-git-merge" 32}}</a>
{{- else}}red{{end}}">{{svg "octicon-git-merge" 32}}</a>
@@ -159,7 +159,7 @@
<i class="icon icon-octicon">{{svg "octicon-x" 16}}</i>
<i class="icon icon-octicon">{{svg "octicon-x" 16}}</i>
{{$.i18n.Tr "repo.pulls.required_status_check_missing"}}
{{$.i18n.Tr "repo.pulls.required_status_check_missing"}}
</div>
</div>
{{else if and .RequireSigned (not .WillSign)}}
{{else if and .AllowMerge . RequireSigned (not .WillSign)}}
<div class="item text red">
<div class="item text red">
<i class="icon icon-octicon">{{svg "octicon-x" 16}}</i>
<i class="icon icon-octicon">{{svg "octicon-x" 16}}</i>
{{$.i18n.Tr "repo.pulls.require_signed_wont_sign"}}
{{$.i18n.Tr "repo.pulls.require_signed_wont_sign"}}
@@ -170,7 +170,7 @@
</div>
</div>
{{end}}
{{end}}
{{$notAllOverridableChecksOk := or .IsBlockedByApprovals .IsBlockedByRejection .IsBlockedByOutdatedBranch (and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess))}}
{{$notAllOverridableChecksOk := or .IsBlockedByApprovals .IsBlockedByRejection .IsBlockedByOutdatedBranch (and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess))}}
{{if and (or $.IsRepoAdmin (not $notAllOverridableChecksOk)) (or (not .RequireSigned) .WillSign)}}
{{if and (or $.IsRepoAdmin (not $notAllOverridableChecksOk)) (or (not .AllowMerge) (not . RequireSigned) .WillSign)}}
{{if $notAllOverridableChecksOk}}
{{if $notAllOverridableChecksOk}}
<div class="item text yellow">
<div class="item text yellow">
<i class="icon icon-octicon">{{svg "octicon-dot-fill" 16}}</i>
<i class="icon icon-octicon">{{svg "octicon-dot-fill" 16}}</i>
@@ -216,7 +216,7 @@
</div>
</div>
{{end}}
{{end}}
{{if and (or $.IsRepoAdmin (not $notAllOverridableChecksOk)) (or (not .RequireSigned) .WillSign)}}
{{if and (or $.IsRepoAdmin (not $notAllOverridableChecksOk)) (or (not .AllowMerge) (not . RequireSigned) .WillSign)}}
{{if .AllowMerge}}
{{if .AllowMerge}}
{{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}}
{{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}}
{{$approvers := .Issue.PullRequest.GetApprovers}}
{{$approvers := .Issue.PullRequest.GetApprovers}}