Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure Update button is enabled even when CI has failed #10640

Merged
merged 5 commits into from
Mar 7, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
ignore pull status
  • Loading branch information
6543 committed Mar 6, 2020
commit 4c32c5968abf1a8a81d3401cf0b64b906489e67f
40 changes: 20 additions & 20 deletions templates/repo/issue/view_content/pull.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -158,26 +158,6 @@
{{$.i18n.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason) }}
</div>
{{end}}
{{if and .Divergence (gt .Divergence.Behind 0)}}
<div class="ui very compact branch-update grid">
<div class="row">
<div class="item text gray eleven wide left floated column">
<i class="icon icon-octicon">{{svg "octicon-alert" 16}}</i>
{{$.i18n.Tr "repo.pulls.outdated_with_base_branch"}}
</div>
{{if .UpdateAllowed}}
<div class="item text five wide right floated column">
<form action="{{.Link}}/update" method="post">
{{.CsrfTokenHtml}}
<button class="ui button" data-do="update">
<span class="item text">{{$.i18n.Tr "repo.pulls.update_branch"}}</span>
</button>
</form>
</div>
{{end}}
</div>
</div>
{{end}}
{{if .AllowMerge}}
{{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}}
{{$approvers := .Issue.PullRequest.GetApprovers}}
Expand Down Expand Up @@ -307,6 +287,26 @@
</div>
{{end}}
{{end}}
{{if and .Divergence (gt .Divergence.Behind 0)}}
<div class="ui very compact branch-update grid">
<div class="row">
<div class="item text gray eleven wide left floated column">
<i class="icon icon-octicon">{{svg "octicon-alert" 16}}</i>
{{$.i18n.Tr "repo.pulls.outdated_with_base_branch"}}
</div>
{{if .UpdateAllowed}}
<div class="item text five wide right floated column">
<form action="{{.Link}}/update" method="post">
{{.CsrfTokenHtml}}
<button class="ui button" data-do="update">
<span class="item text">{{$.i18n.Tr "repo.pulls.update_branch"}}</span>
</button>
</form>
</div>
{{end}}
</div>
</div>
{{end}}
{{else}}
{{/* Merge conflict without specific file. Suggest manual merge, only if all reviews and status checks OK. */}}
{{if .IsBlockedByApprovals}}
Expand Down