Skip to content

Commit 2c04595

Browse files
authored
Always show the command line instructions button even if there are conflicts (#22909)
Always show the `command line instructions` button even if there are conflicts.
1 parent 4d30632 commit 2c04595

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

Diff for: templates/repo/issue/view_content/pull.tmpl

+15-13
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,11 @@
167167
<div class="item text">
168168
{{svg "octicon-x"}}
169169
{{$.locale.Tr "repo.pulls.files_conflicted"}}
170-
{{range .ConflictedFiles}}
171-
<div>{{.}}</div>
172-
{{end}}
170+
<ul>
171+
{{range .ConflictedFiles}}
172+
<li>{{.}}</li>
173+
{{end}}
174+
</ul>
173175
</div>
174176
{{else if .IsPullRequestBroken}}
175177
<div class="item">
@@ -226,11 +228,11 @@
226228
<div class="item">
227229
<i class="icon icon-octicon">{{svg "octicon-x" 16}}</i>
228230
{{$.locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n" | Safe}}
229-
<div class="ui ordered list">
231+
<ul>
230232
{{range .ChangedProtectedFiles}}
231-
<div data-value="-" class="item">{{.}}</div>
233+
<li>{{.}}</li>
232234
{{end}}
233-
</div>
235+
</ul>
234236
</div>
235237
{{else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsError .RequiredStatusCheckState.IsFailure)}}
236238
<div class="item">
@@ -378,10 +380,6 @@
378380
</script>
379381

380382
<div id="pull-request-merge-form"></div>
381-
382-
{{if .ShowMergeInstructions}}
383-
{{template "repo/issue/view_content/pull_merge_instruction" (dict "locale" .locale "Issue" .Issue)}}
384-
{{end}}
385383
{{else}}
386384
{{/* no merge style was set in repo setting: not or ($prUnit.PullRequestsConfig.AllowMerge ...) */}}
387385
<div class="ui divider"></div>
@@ -428,11 +426,11 @@
428426
<div class="item text red">
429427
<i class="icon icon-octicon">{{svg "octicon-x" 16}}</i>
430428
{{$.locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n" | Safe}}
431-
<div class="ui ordered list">
429+
<ul>
432430
{{range .ChangedProtectedFiles}}
433-
<div data-value="-" class="item">{{.}}</div>
431+
<li>{{.}}</li>
434432
{{end}}
435-
</div>
433+
</ul>
436434
</div>
437435
{{else if and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess)}}
438436
<div class="item text red">
@@ -479,6 +477,10 @@
479477
</button>
480478
</div>
481479
{{end}}
480+
481+
{{if and .ShowMergeInstructions .Issue.PullRequest.HeadRepo}}
482+
{{template "repo/issue/view_content/pull_merge_instruction" (dict "locale" .locale "Issue" .Issue)}}
483+
{{end}}
482484
</div>
483485
</div>
484486
</div>

Diff for: templates/repo/issue/view_content/pull_merge_instruction.tmpl

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<div class="instruct-toggle gt-mt-3"> {{$.locale.Tr "repo.pulls.merge_instruction_hint" | Safe}} </div>
2-
<div class="instruct-content" style="display:none">
3-
<div class="ui divider"></div>
1+
<div class="ui divider"></div>
2+
<div class="instruct-toggle"> {{$.locale.Tr "repo.pulls.merge_instruction_hint" | Safe}} </div>
3+
<div class="instruct-content gt-mt-3" style="display:none">
44
<div><h3 class="gt-di">{{$.locale.Tr "step1"}} </h3>{{$.locale.Tr "repo.pulls.merge_instruction_step1_desc"}}</div>
55
<div class="ui secondary segment">
66
{{if eq $.Issue.PullRequest.Flow 0}}

0 commit comments

Comments
 (0)