diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index c31d77e1a58ec..00c5ed60764f8 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1276,6 +1276,7 @@ signing.wont_sign.basesigned = The merge will not be signed as the base commit i signing.wont_sign.headsigned = The merge will not be signed as the head commit is not signed signing.wont_sign.commitssigned = The merge will not be signed as all the associated commits are not signed signing.wont_sign.approved = The merge will not be signed as the PR is not approved +signing.wont_sign.not_signed_in = You are not signed in ext_wiki = Ext. Wiki ext_wiki.desc = Link to an external wiki. diff --git a/routers/repo/issue.go b/routers/repo/issue.go index d671f8de74ea7..dabe0f6b0fe17 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -1212,6 +1212,8 @@ func ViewIssue(ctx *context.Context) { log.Error("Error whilst checking if could sign pr %d in repo %s. Error: %v", pull.ID, pull.BaseRepo.FullName(), err) } } + } else { + ctx.Data["WontSignReason"] = "not_signed_in" } ctx.Data["IsPullBranchDeletable"] = canDelete && pull.HeadRepo != nil && diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl index c2b9cb36b9a8c..53e2ddf912b9b 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull.tmpl @@ -73,7 +73,7 @@ {{- else if .IsBlockedByOutdatedBranch}}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 .RequireSigned (not .WillSign)}}red + {{- else if and .AllowMerge .RequireSigned (not .WillSign)}}red {{- else if .Issue.PullRequest.IsChecking}}yellow {{- else if .Issue.PullRequest.CanAutoMerge}}green {{- else}}red{{end}}">{{svg "octicon-git-merge" 32}} @@ -159,7 +159,7 @@ {{svg "octicon-x" 16}} {{$.i18n.Tr "repo.pulls.required_status_check_missing"}} - {{else if and .RequireSigned (not .WillSign)}} + {{else if and .AllowMerge .RequireSigned (not .WillSign)}}