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

Always show the command line instructions button even if there are conflicts #22909

Merged
merged 5 commits into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
28 changes: 15 additions & 13 deletions templates/repo/issue/view_content/pull.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,11 @@
<div class="item text">
{{svg "octicon-x"}}
{{$.locale.Tr "repo.pulls.files_conflicted"}}
{{range .ConflictedFiles}}
<div>{{.}}</div>
{{end}}
<ul>
{{range .ConflictedFiles}}
<li>{{.}}</li>
{{end}}
</ul>
wxiaoguang marked this conversation as resolved.
Show resolved Hide resolved
</div>
{{else if .IsPullRequestBroken}}
<div class="item">
Expand Down Expand Up @@ -226,11 +228,11 @@
<div class="item">
<i class="icon icon-octicon">{{svg "octicon-x" 16}}</i>
{{$.locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n" | Safe}}
<div class="ui ordered list">
<ul>
{{range .ChangedProtectedFiles}}
<div data-value="-" class="item">{{.}}</div>
<li>{{.}}</li>
{{end}}
</div>
</ul>
</div>
{{else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsError .RequiredStatusCheckState.IsFailure)}}
<div class="item">
Expand Down Expand Up @@ -378,10 +380,6 @@
</script>

<div id="pull-request-merge-form"></div>

{{if .ShowMergeInstructions}}
{{template "repo/issue/view_content/pull_merge_instruction" (dict "locale" .locale "Issue" .Issue)}}
{{end}}
{{else}}
{{/* no merge style was set in repo setting: not or ($prUnit.PullRequestsConfig.AllowMerge ...) */}}
<div class="ui divider"></div>
Expand Down Expand Up @@ -428,11 +426,11 @@
<div class="item text red">
<i class="icon icon-octicon">{{svg "octicon-x" 16}}</i>
{{$.locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n" | Safe}}
<div class="ui ordered list">
<ul>
{{range .ChangedProtectedFiles}}
<div data-value="-" class="item">{{.}}</div>
<li>{{.}}</li>
{{end}}
</div>
</ul>
</div>
{{else if and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess)}}
<div class="item text red">
Expand Down Expand Up @@ -479,6 +477,10 @@
</button>
</div>
{{end}}

{{if and .ShowMergeInstructions .Issue.PullRequest.HeadRepo}}
delvh marked this conversation as resolved.
Show resolved Hide resolved
{{template "repo/issue/view_content/pull_merge_instruction" (dict "locale" .locale "Issue" .Issue)}}
{{end}}
</div>
</div>
</div>
6 changes: 3 additions & 3 deletions templates/repo/issue/view_content/pull_merge_instruction.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="instruct-toggle gt-mt-3"> {{$.locale.Tr "repo.pulls.merge_instruction_hint" | Safe}} </div>
<div class="instruct-content" style="display:none">
<div class="ui divider"></div>
<div class="ui divider"></div>
<div class="instruct-toggle"> {{$.locale.Tr "repo.pulls.merge_instruction_hint" | Safe}} </div>
<div class="instruct-content gt-mt-3" style="display:none">
<div><h3 class="gt-di">{{$.locale.Tr "step1"}} </h3>{{$.locale.Tr "repo.pulls.merge_instruction_step1_desc"}}</div>
<div class="ui secondary segment">
{{if eq $.Issue.PullRequest.Flow 0}}
Expand Down