Skip to content

Commit 57c7a7a

Browse files
authored
Ensure Update button is enabled even when CI has failed (#10640)
* ignore pull status * fix css * fix css
1 parent 4a4fc73 commit 57c7a7a

File tree

2 files changed

+26
-22
lines changed

2 files changed

+26
-22
lines changed

templates/repo/issue/view_content/pull.tmpl

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -158,26 +158,6 @@
158158
{{$.i18n.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason) }}
159159
</div>
160160
{{end}}
161-
{{if and .Divergence (gt .Divergence.Behind 0)}}
162-
<div class="ui very compact branch-update grid">
163-
<div class="row">
164-
<div class="item text gray eleven wide left floated column">
165-
<i class="icon icon-octicon">{{svg "octicon-alert" 16}}</i>
166-
{{$.i18n.Tr "repo.pulls.outdated_with_base_branch"}}
167-
</div>
168-
{{if .UpdateAllowed}}
169-
<div class="item text five wide right floated column">
170-
<form action="{{.Link}}/update" method="post">
171-
{{.CsrfTokenHtml}}
172-
<button class="ui button" data-do="update">
173-
<span class="item text">{{$.i18n.Tr "repo.pulls.update_branch"}}</span>
174-
</button>
175-
</form>
176-
</div>
177-
{{end}}
178-
</div>
179-
</div>
180-
{{end}}
181161
{{if .AllowMerge}}
182162
{{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}}
183163
{{$approvers := .Issue.PullRequest.GetApprovers}}
@@ -307,6 +287,26 @@
307287
</div>
308288
{{end}}
309289
{{end}}
290+
{{if and .Divergence (gt .Divergence.Behind 0)}}
291+
<div class="ui very compact branch-update grid">
292+
<div class="row">
293+
<div class="item text gray eleven wide left floated column">
294+
<i class="icon icon-octicon">{{svg "octicon-alert" 16}}</i>
295+
{{$.i18n.Tr "repo.pulls.outdated_with_base_branch"}}
296+
</div>
297+
{{if .UpdateAllowed}}
298+
<div class="item text five wide right floated column">
299+
<form action="{{.Link}}/update" method="post">
300+
{{.CsrfTokenHtml}}
301+
<button class="ui button" data-do="update">
302+
<span class="item text">{{$.i18n.Tr "repo.pulls.update_branch"}}</span>
303+
</button>
304+
</form>
305+
</div>
306+
{{end}}
307+
</div>
308+
</div>
309+
{{end}}
310310
{{else}}
311311
{{/* Merge conflict without specific file. Suggest manual merge, only if all reviews and status checks OK. */}}
312312
{{if .IsBlockedByApprovals}}

web_src/less/_repository.less

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,10 +659,14 @@
659659
padding-left: 2px;
660660
}
661661
.branch-update.grid {
662-
margin-bottom: -1.5rem;
663-
margin-top: -.5rem;
664662
.row {
665663
padding-bottom: 0;
664+
.icon {
665+
margin-top: 1.1rem;
666+
}
667+
.ui.button {
668+
margin-bottom: 1rem;
669+
}
666670
}
667671
}
668672
}

0 commit comments

Comments
 (0)