2020-10-14 17:41:11 +05:30
{{if or .PullReviewers .OriginalReviews }}
2018-11-22 18:47:36 +05:30
<div class="comment box">
<div class="content">
<div class="ui segment">
<h4>{{$.i18n.Tr "repo.issues.review.reviewers"}}</h4>
2019-12-04 06:38:56 +05:30
{{range .PullReviewers}}
2020-10-13 01:25:13 +05:30
{{ $ createdStr := TimeSinceUnix .Review.UpdatedUnix $.Lang }}
2018-11-22 18:47:36 +05:30
<div class="ui divider"></div>
<div class="review-item">
2020-06-15 13:07:00 +05:30
<div class="review-item-left">
2020-10-13 01:25:13 +05:30
{{if .User}}
<a class="ui avatar image" href="{{.User.HomeLink}}">
<img src="{{.User.RelAvatarLink}}">
</a>
{{end}}
<span class="text grey">
{{if .User}}
2020-11-04 14:41:19 +05:30
<a href="{{.User.HomeLink}}">{{.User.GetDisplayName}}</a>
2020-10-13 01:25:13 +05:30
{{else if .Team}}
<span class="ui text">{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}</span>
{{end}}
{{if eq .Review.Type 1}}
2020-06-15 13:07:00 +05:30
{{$.i18n.Tr "repo.issues.review.approve" $ createdStr | Safe}}
2020-10-13 01:25:13 +05:30
{{else if eq .Review.Type 2}}
2020-06-15 13:07:00 +05:30
{{$.i18n.Tr "repo.issues.review.comment" $ createdStr | Safe}}
2020-10-13 01:25:13 +05:30
{{else if eq .Review.Type 3}}
2020-06-15 13:07:00 +05:30
{{$.i18n.Tr "repo.issues.review.reject" $ createdStr | Safe}}
2020-10-13 01:25:13 +05:30
{{else if eq .Review.Type 4}}
2020-06-15 13:07:00 +05:30
{{$.i18n.Tr "repo.issues.review.wait" $ createdStr | Safe}}
{{else}}
{{$.i18n.Tr "repo.issues.review.comment" $ createdStr | Safe}}
2020-04-06 22:03:34 +05:30
{{end}}
2020-06-15 13:07:00 +05:30
</span>
</div>
<div class="review-item-right">
2020-10-13 01:25:13 +05:30
{{if .Review.Stale}}
2020-09-04 22:06:37 +05:30
<span class="ui poping up type-icon text grey" data-content="{{$.i18n.Tr "repo.issues.is_stale"}}">
2020-06-15 13:07:00 +05:30
<i class="octicon icon fa-hourglass-end"></i>
</span>
2020-04-06 22:03:34 +05:30
{{end}}
2020-10-13 01:25:13 +05:30
<span class="type-icon text {{if eq .Review.Type 1}}green
{{- else if eq .Review.Type 2}}grey
{{- else if eq .Review.Type 3}}red
{{- else if eq .Review.Type 4}}yellow
2020-06-15 13:07:00 +05:30
{{else}}grey{{end}}">
2020-04-06 22:03:34 +05:30
2020-10-13 01:25:13 +05:30
{{if .CanChange }}
<a href=" #" class="ui poping up icon re-request-review {{if .Checked}}checked{{end}}" data-issue-id="{{$.Issue.ID}}" data-content="{{if .Checked}} {{$.i18n.Tr "repo.issues.remove_request_review"}} {{else}} {{$.i18n.Tr "repo.issues.re_request_review"}} {{end}}" data-id="{{.ItemID}}" data-update-url="{{$.RepoLink}}/issues/request_review">
2020-09-12 01:49:00 +05:30
{{svg "octicon-sync"}}
2020-06-15 13:07:00 +05:30
</a>
{{end}}
2020-10-13 01:25:13 +05:30
{{svg (printf "octicon-%s" .Review.Type.Icon)}}
2020-06-15 13:07:00 +05:30
</span>
</div>
2018-11-22 18:47:36 +05:30
</div>
{{end}}
2020-10-14 17:41:11 +05:30
{{range .OriginalReviews}}
{{ $ createdStr := TimeSinceUnix .UpdatedUnix $.Lang }}
<div class="ui divider"></div>
<div class="review-item">
<div class="review-item-left">
<a href="{{$.Repository.OriginalURL}}" class="ui poping up" data-content="{{$.i18n.Tr "repo.migrated_from_fake" $.Repository.GetOriginalURLHostname | Safe }}"><span class="text black "><i class="fa {{MigrationIcon $.Repository.GetOriginalURLHostname}}" aria-hidden="true"></i> {{ .OriginalAuthor }}</span></a>
</div>
<div class="review-item-right">
<span class="type-icon text {{if eq .Type 1}}green
{{- else if eq .Type 2}}grey
{{- else if eq .Type 3}}red
{{- else if eq .Type 4}}yellow
{{else}}grey{{end}}">
{{svg (printf "octicon-%s" .Type.Icon)}}
</span>
</div>
</div>
{{end}}
2018-11-22 18:47:36 +05:30
</div>
</div>
</div>
{{end}}
2020-04-11 03:31:41 +05:30
<div class="timeline-item comment merge box">
<a class="timeline-avatar text {{if .Issue.PullRequest.HasMerged}}purple
2020-04-03 10:42:42 +05:30
{{- else if .Issue.IsClosed}}grey
{{- else if .IsPullWorkInProgress}}grey
{{- else if .IsFilesConflicted}}grey
{{- else if .IsPullRequestBroken}}red
{{- else if .IsBlockedByApprovals}}red
{{- else if .IsBlockedByRejection}}red
2020-04-17 06:30:36 +05:30
{{- else if .IsBlockedByOutdatedBranch}}red
2020-10-14 00:20:57 +05:30
{{- else if .IsBlockedByChangedProtectedFiles}}red
2020-04-03 10:42:42 +05:30
{{- else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsFailure .RequiredStatusCheckState.IsError)}}red
2020-04-16 02:05:18 +05:30
{{- else if and .EnableStatusCheck (or (not $.LatestCommitStatus) .RequiredStatusCheckState.IsPending .RequiredStatusCheckState.IsWarning)}}yellow
2020-08-24 03:29:41 +05:30
{{- else if and .AllowMerge .RequireSigned (not .WillSign)}}red
2020-04-03 10:42:42 +05:30
{{- else if .Issue.PullRequest.IsChecking}}yellow
{{- else if .Issue.PullRequest.CanAutoMerge}}green
{{- else}}red{{end}}">{{svg "octicon-git-merge" 32}}</a>
2017-03-17 11:27:43 +05:30
<div class="content">
2019-06-30 13:27:59 +05:30
{{template "repo/pulls/status" .}}
2020-06-14 00:19:59 +05:30
{{ $ canAutoMerge := false}}
2020-05-26 00:38:06 +05:30
<div class="ui attached merge-section segment {{if not $.LatestCommitStatus}}no-header{{end}}">
2017-03-17 11:27:43 +05:30
{{if .Issue.PullRequest.HasMerged}}
<div class="item text purple">
2019-09-03 11:59:36 +05:30
{{if .Issue.PullRequest.MergedCommitID}}
{{ $ link := printf "%s/commit/%s" $.Repository.HTMLURL .Issue.PullRequest.MergedCommitID}}
{{$.i18n.Tr "repo.pulls.merged_as" $ link (ShortSha .Issue.PullRequest.MergedCommitID) | Safe}}
{{else}}
{{$.i18n.Tr "repo.pulls.has_merged"}}
{{end}}
2017-03-17 11:27:43 +05:30
</div>
{{if .IsPullBranchDeletable}}
<div class="ui divider"></div>
<div>
<a class="delete-button ui red button" href="" data-url="{{.DeleteBranchLink}}">{{$.i18n.Tr "repo.branch.delete" .HeadTarget}}</a>
</div>
{{end}}
{{else if .Issue.IsClosed}}
<div class="item text grey">
2019-04-21 02:20:34 +05:30
{{if .IsPullRequestBroken}}
{{$.i18n.Tr "repo.pulls.cant_reopen_deleted_branch"}}
{{else}}
{{$.i18n.Tr "repo.pulls.reopen_to_merge"}}
{{end}}
2017-03-17 11:27:43 +05:30
</div>
2020-01-07 22:36:14 +05:30
{{if and .IsPullBranchDeletable ( not .IsPullRequestBroken )}}
2019-04-21 02:20:34 +05:30
<div class="ui divider"></div>
<div>
<a class="delete-button ui red button" href="" data-url="{{.DeleteBranchLink}}">{{$.i18n.Tr "repo.branch.delete" .HeadTarget}}</a>
</div>
{{end}}
2019-02-05 17:24:49 +05:30
{{else if .IsPullFilesConflicted}}
<div class="item text grey">
2020-09-12 01:49:00 +05:30
{{svg "octicon-x"}}
2019-02-05 17:24:49 +05:30
{{$.i18n.Tr "repo.pulls.files_conflicted"}}
{{range .ConflictedFiles}}
<div>{{.}}</div>
{{end}}
</div>
2018-08-01 08:30:35 +05:30
{{else if .IsPullRequestBroken}}
2017-03-17 11:27:43 +05:30
<div class="item text red">
2020-09-12 01:49:00 +05:30
<i class="icon icon-octicon">{{svg "octicon-x"}}</i>
2017-03-17 11:27:43 +05:30
{{$.i18n.Tr "repo.pulls.data_broken"}}
</div>
2018-08-14 00:34:39 +05:30
{{else if .IsPullWorkInProgress}}
<div class="item text grey">
2020-09-12 01:49:00 +05:30
<i class="icon icon-octicon">{{svg "octicon-x"}}</i>
2020-08-28 10:07:05 +05:30
{{$.i18n.Tr "repo.pulls.cannot_merge_work_in_progress" (.WorkInProgressPrefix|Escape) | Str2html}}
2018-08-14 00:34:39 +05:30
</div>
2017-03-17 11:27:43 +05:30
{{else if .Issue.PullRequest.IsChecking}}
<div class="item text yellow">
2020-09-12 01:49:00 +05:30
<i class="icon icon-octicon">{{svg "octicon-sync"}}</i>
2017-03-17 11:27:43 +05:30
{{$.i18n.Tr "repo.pulls.is_checking"}}
</div>
{{else if .Issue.PullRequest.CanAutoMerge}}
2020-01-11 12:59:34 +05:30
{{if .IsBlockedByApprovals}}
<div class="item text red">
2020-09-12 01:49:00 +05:30
<i class="icon icon-octicon">{{svg "octicon-x"}}</i>
2020-01-11 12:59:34 +05:30
{{$.i18n.Tr "repo.pulls.blocked_by_approvals" .GrantedApprovals .Issue.PullRequest.ProtectedBranch.RequiredApprovals}}
</div>
{{else if .IsBlockedByRejection}}
<div class="item text red">
2020-09-12 01:49:00 +05:30
<i class="icon icon-octicon">{{svg "octicon-x"}}</i>
2020-01-11 12:59:34 +05:30
{{$.i18n.Tr "repo.pulls.blocked_by_rejection"}}
</div>
2020-04-17 06:30:36 +05:30
{{else if .IsBlockedByOutdatedBranch}}
<div class="item text red">
2020-09-12 01:49:00 +05:30
<i class="icon icon-octicon">{{svg "octicon-x"}}</i>
2020-04-17 06:30:36 +05:30
{{$.i18n.Tr "repo.pulls.blocked_by_outdated_branch"}}
</div>
2020-10-14 00:20:57 +05:30
{{else if .IsBlockedByChangedProtectedFiles}}
<div class="item text red">
<i class="icon icon-octicon">{{svg "octicon-x" 16}}</i>
{{$.i18n.Tr (TrN $.i18n.Lang $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n") | Safe }}
<div class="ui ordered list">
{{range .ChangedProtectedFiles}}
<div data-value="-" class="item">{{.}}</div>
{{end}}
</div>
</div>
2020-01-22 09:16:04 +05:30
{{else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsError .RequiredStatusCheckState.IsFailure)}}
2020-01-11 12:59:34 +05:30
<div class="item text red">
2020-09-12 01:49:00 +05:30
<i class="icon icon-octicon">{{svg "octicon-x"}}</i>
2020-01-11 12:59:34 +05:30
{{$.i18n.Tr "repo.pulls.required_status_check_failed"}}
</div>
2020-04-16 02:05:18 +05:30
{{else if and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess)}}
<div class="item text red">
2020-09-12 01:49:00 +05:30
<i class="icon icon-octicon">{{svg "octicon-x"}}</i>
2020-04-16 02:05:18 +05:30
{{$.i18n.Tr "repo.pulls.required_status_check_missing"}}
</div>
2020-08-24 03:29:41 +05:30
{{else if and .AllowMerge .RequireSigned (not .WillSign)}}
2020-01-15 14:02:57 +05:30
<div class="item text red">
2020-09-12 01:49:00 +05:30
<i class="icon icon-octicon">{{svg "octicon-x"}}</i>
2020-01-15 14:02:57 +05:30
{{$.i18n.Tr "repo.pulls.require_signed_wont_sign"}}
</div>
<div class="item text yellow">
2020-01-18 17:00:35 +05:30
<i class="icon unlock"></i>
2020-01-15 14:02:57 +05:30
{{$.i18n.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason) }}
</div>
2019-09-18 11:09:45 +05:30
{{end}}
2020-10-14 00:20:57 +05:30
{{ $ notAllOverridableChecksOk := or .IsBlockedByApprovals .IsBlockedByRejection .IsBlockedByOutdatedBranch .IsBlockedByChangedProtectedFiles (and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess))}}
2020-08-24 03:29:41 +05:30
{{if and (or $.IsRepoAdmin (not $ notAllOverridableChecksOk )) (or (not .AllowMerge) (not .RequireSigned) .WillSign)}}
2020-01-17 02:31:22 +05:30
{{if $ notAllOverridableChecksOk }}
2019-09-18 11:09:45 +05:30
<div class="item text yellow">
2020-09-12 01:49:00 +05:30
<i class="icon icon-octicon">{{svg "octicon-dot-fill"}}</i>
2019-09-18 11:09:45 +05:30
{{$.i18n.Tr "repo.pulls.required_status_check_administrator"}}
2018-12-27 15:57:08 +05:30
</div>
2019-09-18 11:09:45 +05:30
{{else}}
<div class="item text green">
2020-09-12 01:49:00 +05:30
<i class="icon icon-octicon">{{svg "octicon-check"}}</i>
2019-09-18 11:09:45 +05:30
{{$.i18n.Tr "repo.pulls.can_auto_merge_desc"}}
2018-01-06 00:26:50 +05:30
</div>
2019-09-18 11:09:45 +05:30
{{end}}
2020-01-15 14:02:57 +05:30
{{if .WillSign}}
<div class="item text green">
<i class="icon lock green"></i>
{{$.i18n.Tr "repo.signing.will_sign" .SigningKey}}
</div>
2020-01-16 04:25:25 +05:30
{{else if .IsSigned}}
2020-01-18 17:00:35 +05:30
<div class="item text">
<i class="icon unlock"></i>
2020-01-15 14:02:57 +05:30
{{$.i18n.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason) }}
</div>
{{end}}
2020-06-14 00:19:59 +05:30
{{end}}
2020-06-18 06:50:07 +05:30
2020-06-14 00:19:59 +05:30
{{ $ canAutoMerge = true}}
{{if (gt .Issue.PullRequest.CommitsBehind 0)}}
<div class="ui divider"></div>
<div class="item item-section text grey">
<div class="item-section-left">
2020-09-12 01:49:00 +05:30
<i class="icon icon-octicon">{{svg "octicon-alert"}}</i>
2020-06-14 00:19:59 +05:30
{{$.i18n.Tr "repo.pulls.outdated_with_base_branch"}}
</div>
<div class="item-section-right">
{{if .UpdateAllowed}}
<form action="{{.Link}}/update" method="post" class="ui update-branch-form">
{{.CsrfTokenHtml}}
<button class="ui compact button" data-do="update">
<span class="ui text">{{$.i18n.Tr "repo.pulls.update_branch"}}</span>
</button>
</form>
{{end}}
</div>
</div>
{{end}}
2020-08-24 03:29:41 +05:30
{{if and (or $.IsRepoAdmin (not $ notAllOverridableChecksOk )) (or (not .AllowMerge) (not .RequireSigned) .WillSign)}}
2019-09-18 11:09:45 +05:30
{{if .AllowMerge}}
{{ $ prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}}
2019-12-31 05:04:11 +05:30
{{ $ approvers := .Issue.PullRequest.GetApprovers}}
2019-09-18 11:09:45 +05:30
{{if or $ prUnit . PullRequestsConfig . AllowMerge $ prUnit . PullRequestsConfig . AllowRebase $ prUnit . PullRequestsConfig . AllowRebaseMerge $ prUnit . PullRequestsConfig . AllowSquash }}
<div class="ui divider"></div>
{{if $ prUnit . PullRequestsConfig . AllowMerge }}
<div class="ui form merge-fields" style="display: none">
<form action="{{.Link}}/merge" method="post">
{{.CsrfTokenHtml}}
<div class="field">
<input type="text" name="merge_title_field" value="{{.Issue.PullRequest.GetDefaultMergeMessage}}">
</div>
<div class="field">
2020-01-09 20:01:09 +05:30
<textarea name="merge_message_field" rows="5" placeholder="{{$.i18n.Tr "repo.editor.commit_message_desc"}}">Reviewed-on: {{$.Issue.HTMLURL}}& #13;& #10;{{ $ approvers }}</textarea>
2019-09-18 11:09:45 +05:30
</div>
<button class="ui green button" type="submit" name="do" value="merge">
{{$.i18n.Tr "repo.pulls.merge_pull_request"}}
</button>
<button class="ui button merge-cancel">
{{$.i18n.Tr "cancel"}}
</button>
</form>
</div>
{{end}}
{{if $ prUnit . PullRequestsConfig . AllowRebase }}
<div class="ui form rebase-fields" style="display: none">
<form action="{{.Link}}/merge" method="post">
{{.CsrfTokenHtml}}
<button class="ui green button" type="submit" name="do" value="rebase">
{{$.i18n.Tr "repo.pulls.rebase_merge_pull_request"}}
</button>
<button class="ui button merge-cancel">
{{$.i18n.Tr "cancel"}}
</button>
</form>
</div>
{{end}}
{{if $ prUnit . PullRequestsConfig . AllowRebaseMerge }}
<div class="ui form rebase-merge-fields" style="display: none">
<form action="{{.Link}}/merge" method="post">
{{.CsrfTokenHtml}}
<div class="field">
<input type="text" name="merge_title_field" value="{{.Issue.PullRequest.GetDefaultMergeMessage}}">
</div>
<div class="field">
2020-01-09 20:01:09 +05:30
<textarea name="merge_message_field" rows="5" placeholder="{{$.i18n.Tr "repo.editor.commit_message_desc"}}">Reviewed-on: {{$.Issue.HTMLURL}}& #13;& #10;{{ $ approvers }}</textarea>
2019-09-18 11:09:45 +05:30
</div>
<button class="ui green button" type="submit" name="do" value="rebase-merge">
{{$.i18n.Tr "repo.pulls.rebase_merge_commit_pull_request"}}
</button>
<button class="ui button merge-cancel">
{{$.i18n.Tr "cancel"}}
</button>
</form>
</div>
{{end}}
{{if $ prUnit . PullRequestsConfig . AllowSquash }}
<div class="ui form squash-fields" style="display: none">
<form action="{{.Link}}/merge" method="post">
{{.CsrfTokenHtml}}
<div class="field">
<input type="text" name="merge_title_field" value="{{.Issue.PullRequest.GetDefaultSquashMessage}}">
</div>
<div class="field">
2020-04-10 16:56:37 +05:30
<textarea name="merge_message_field" rows="5" placeholder="{{$.i18n.Tr "repo.editor.commit_message_desc"}}">{{.GetCommitMessages}}Reviewed-on: {{$.Issue.HTMLURL}}& #13;& #10;{{ $ approvers }}</textarea>
2019-09-18 11:09:45 +05:30
</div>
<button class="ui green button" type="submit" name="do" value="squash">
{{$.i18n.Tr "repo.pulls.squash_merge_pull_request"}}
</button>
<button class="ui button merge-cancel">
{{$.i18n.Tr "cancel"}}
</button>
</form>
</div>
{{end}}
2020-01-17 02:31:22 +05:30
<div class="ui {{if $ notAllOverridableChecksOk }}red{{else}}green{{end}} buttons merge-button">
2019-09-18 11:09:45 +05:30
<button class="ui button" data-do="{{.MergeStyle}}">
2020-09-12 01:49:00 +05:30
{{svg "octicon-git-merge"}}
2019-09-18 11:09:45 +05:30
<span class="button-text">
{{if eq .MergeStyle "merge"}}
{{$.i18n.Tr "repo.pulls.merge_pull_request"}}
2018-01-06 00:26:50 +05:30
{{end}}
2019-09-18 11:09:45 +05:30
{{if eq .MergeStyle "rebase"}}
{{$.i18n.Tr "repo.pulls.rebase_merge_pull_request"}}
2018-01-06 00:26:50 +05:30
{{end}}
2019-09-18 11:09:45 +05:30
{{if eq .MergeStyle "rebase-merge"}}
{{$.i18n.Tr "repo.pulls.rebase_merge_commit_pull_request"}}
2018-12-27 15:57:08 +05:30
{{end}}
2019-09-18 11:09:45 +05:30
{{if eq .MergeStyle "squash"}}
{{$.i18n.Tr "repo.pulls.squash_merge_pull_request"}}
2018-01-06 00:26:50 +05:30
{{end}}
2019-09-18 11:09:45 +05:30
</span>
</button>
<div class="ui dropdown icon button">
2020-11-01 03:45:11 +05:30
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
2020-06-18 06:50:07 +05:30
<div class="menu">
2019-09-18 11:09:45 +05:30
{{if $ prUnit . PullRequestsConfig . AllowMerge }}
<div class="item{{if eq .MergeStyle "merge"}} active selected{{end}}" data-do="merge">{{$.i18n.Tr "repo.pulls.merge_pull_request"}}</div>
{{end}}
{{if $ prUnit . PullRequestsConfig . AllowRebase }}
<div class="item{{if eq .MergeStyle "rebase"}} active selected{{end}}" data-do="rebase">{{$.i18n.Tr "repo.pulls.rebase_merge_pull_request"}}</div>
{{end}}
{{if $ prUnit . PullRequestsConfig . AllowRebaseMerge }}
<div class="item{{if eq .MergeStyle "rebase-merge"}} active selected{{end}}" data-do="rebase-merge">{{$.i18n.Tr "repo.pulls.rebase_merge_commit_pull_request"}}</div>
{{end}}
{{if $ prUnit . PullRequestsConfig . AllowSquash }}
<div class="item{{if eq .MergeStyle "squash"}} active selected{{end}}" data-do="squash">{{$.i18n.Tr "repo.pulls.squash_merge_pull_request"}}</div>
{{end}}
</div>
2018-01-06 00:26:50 +05:30
</div>
</div>
2019-09-18 11:09:45 +05:30
{{else}}
2020-06-14 00:19:59 +05:30
<div class="ui divider"></div>
2019-09-18 11:09:45 +05:30
<div class="item text red">
2020-09-12 01:49:00 +05:30
{{svg "octicon-x"}}
2019-09-18 11:09:45 +05:30
{{$.i18n.Tr "repo.pulls.no_merge_desc"}}
</div>
<div class="item text grey">
2020-09-12 01:49:00 +05:30
{{svg "octicon-info"}}
2019-09-18 11:09:45 +05:30
{{$.i18n.Tr "repo.pulls.no_merge_helper"}}
</div>
{{end}}
2020-01-11 12:59:34 +05:30
{{else}}
2020-06-14 00:19:59 +05:30
<div class="ui divider"></div>
2020-01-11 12:59:34 +05:30
<div class="item text grey">
2020-09-12 01:49:00 +05:30
{{svg "octicon-info"}}
2020-01-11 12:59:34 +05:30
{{$.i18n.Tr "repo.pulls.no_merge_access"}}
</div>
2018-01-06 00:26:50 +05:30
{{end}}
2017-03-17 11:27:43 +05:30
{{end}}
{{else}}
2020-01-11 12:59:34 +05:30
{{/* Merge conflict without specific file. Suggest manual merge, only if all reviews and status checks OK. */}}
{{if .IsBlockedByApprovals}}
<div class="item text red">
2020-09-12 01:49:00 +05:30
{{svg "octicon-x"}}
2020-01-11 12:59:34 +05:30
{{$.i18n.Tr "repo.pulls.blocked_by_approvals" .GrantedApprovals .Issue.PullRequest.ProtectedBranch.RequiredApprovals}}
</div>
{{else if .IsBlockedByRejection}}
<div class="item text red">
2020-09-12 01:49:00 +05:30
{{svg "octicon-x"}}
2020-01-11 12:59:34 +05:30
{{$.i18n.Tr "repo.pulls.blocked_by_rejection"}}
</div>
2020-04-17 06:30:36 +05:30
{{else if .IsBlockedByOutdatedBranch}}
<div class="item text red">
2020-09-12 01:49:00 +05:30
<i class="icon icon-octicon">{{svg "octicon-x"}}</i>
2020-04-17 06:30:36 +05:30
{{$.i18n.Tr "repo.pulls.blocked_by_outdated_branch"}}
</div>
2020-10-14 00:20:57 +05:30
{{else if .IsBlockedByChangedProtectedFiles}}
<div class="item text red">
<i class="icon icon-octicon">{{svg "octicon-x" 16}}</i>
{{$.i18n.Tr (TrN $.i18n.Lang $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n") | Safe }}
<div class="ui ordered list">
{{range .ChangedProtectedFiles}}
<div data-value="-" class="item">{{.}}</div>
{{end}}
</div>
</div>
2020-04-16 02:05:18 +05:30
{{else if and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess)}}
2020-01-11 12:59:34 +05:30
<div class="item text red">
2020-09-12 01:49:00 +05:30
{{svg "octicon-x"}}
2020-01-11 12:59:34 +05:30
{{$.i18n.Tr "repo.pulls.required_status_check_failed"}}
</div>
2020-01-15 14:02:57 +05:30
{{else if and .RequireSigned (not .WillSign)}}
<div class="item text red">
2020-09-12 01:49:00 +05:30
{{svg "octicon-x"}}
2020-01-15 14:02:57 +05:30
{{$.i18n.Tr "repo.pulls.require_signed_wont_sign"}}
</div>
2020-01-11 12:59:34 +05:30
{{else}}
<div class="item text red">
2020-09-12 01:49:00 +05:30
{{svg "octicon-x"}}
2020-01-11 12:59:34 +05:30
{{$.i18n.Tr "repo.pulls.cannot_auto_merge_desc"}}
</div>
<div class="item text grey">
2020-09-12 01:49:00 +05:30
{{svg "octicon-info"}}
2020-01-11 12:59:34 +05:30
{{$.i18n.Tr "repo.pulls.cannot_auto_merge_helper"}}
</div>
{{end}}
2017-03-17 11:27:43 +05:30
{{end}}
2020-06-14 00:19:59 +05:30
{{if and (gt .Issue.PullRequest.CommitsBehind 0) (not .Issue.IsClosed) (not .Issue.PullRequest.IsChecking) (not .IsPullFilesConflicted) (not .IsPullRequestBroken) (not $ canAutoMerge )}}
<div class="item text grey">
2020-09-12 01:49:00 +05:30
<i class="icon icon-octicon">{{svg "octicon-alert"}}</i>
2020-06-14 00:19:59 +05:30
{{$.i18n.Tr "repo.pulls.outdated_with_base_branch"}}
{{if .UpdateAllowed}}
<form action="{{.Link}}/update" method="post" class="ui floating right">
{{.CsrfTokenHtml}}
<button class="ui compact button" data-do="update">
<span class="ui text">{{$.i18n.Tr "repo.pulls.update_branch"}}</span>
</button>
</form>
{{end}}
</div>
{{end}}
2017-03-17 11:27:43 +05:30
</div>
</div>
</div>