From 2c04595762b5c6ecfef8a32b05de7a5ef5f7066c Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Wed, 15 Feb 2023 23:31:35 +0800 Subject: [PATCH] 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. --- templates/repo/issue/view_content/pull.tmpl | 28 ++++++++++--------- .../view_content/pull_merge_instruction.tmpl | 6 ++-- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl index 663264171b..dff6b5daaa 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull.tmpl @@ -167,9 +167,11 @@
{{svg "octicon-x"}} {{$.locale.Tr "repo.pulls.files_conflicted"}} - {{range .ConflictedFiles}} -
{{.}}
- {{end}} +
{{else if .IsPullRequestBroken}}
@@ -226,11 +228,11 @@
{{svg "octicon-x" 16}} {{$.locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n" | Safe}} -
+
    {{range .ChangedProtectedFiles}} -
    {{.}}
    +
  • {{.}}
  • {{end}} -
+
{{else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsError .RequiredStatusCheckState.IsFailure)}}
@@ -378,10 +380,6 @@
- - {{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 ...) */}}
@@ -428,11 +426,11 @@
{{svg "octicon-x" 16}} {{$.locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n" | Safe}} -
+
    {{range .ChangedProtectedFiles}} -
    {{.}}
    +
  • {{.}}
  • {{end}} -
+
{{else if and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess)}}
@@ -479,6 +477,10 @@
{{end}} + + {{if and .ShowMergeInstructions .Issue.PullRequest.HeadRepo}} + {{template "repo/issue/view_content/pull_merge_instruction" (dict "locale" .locale "Issue" .Issue)}} + {{end}}
diff --git a/templates/repo/issue/view_content/pull_merge_instruction.tmpl b/templates/repo/issue/view_content/pull_merge_instruction.tmpl index 5669b2fb69..39349d6ca4 100644 --- a/templates/repo/issue/view_content/pull_merge_instruction.tmpl +++ b/templates/repo/issue/view_content/pull_merge_instruction.tmpl @@ -1,6 +1,6 @@ -
{{$.locale.Tr "repo.pulls.merge_instruction_hint" | Safe}}
-