From c275d037f2cce36a0e81644c24abab9df420a32c Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 21 Feb 2023 01:25:05 +0800 Subject: [PATCH 1/2] backport --- templates/repo/issue/view_content/pull.tmpl | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl index 1e07225300bba..1ae4674a711b6 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull.tmpl @@ -129,6 +129,7 @@
{{template "repo/pulls/status" .}} {{$canAutoMerge := false}} + {{$showGeneralMergeForm := false}}
{{if .Issue.PullRequest.HasMerged}}
@@ -410,6 +411,7 @@ })(); + {{$showGeneralMergeForm = true}}
{{if .ShowMergeInstructions}} @@ -487,30 +489,21 @@ {{$.locale.Tr "repo.pulls.cannot_auto_merge_helper"}}
{{end}} - {{end}} + {{end}}{{/* end if: pull request status */}} - {{if $.StillCanManualMerge}} + {{if and $.StillCanManualMerge (not $showGeneralMergeForm)}}
-
From 987c925618ac03a6e593941aabc512e4df75ce0e Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 21 Feb 2023 12:23:03 +0800 Subject: [PATCH 2/2] add missing input for vue --- templates/repo/issue/view_content/pull.tmpl | 1 + web_src/js/components/PullRequestMergeForm.vue | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl index 1ae4674a711b6..d765daf322551 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull.tmpl @@ -352,6 +352,7 @@ 'textAutoMergeButtonWhenSucceed': {{$.locale.Tr "repo.pulls.auto_merge_button_when_succeed"}}, 'textAutoMergeWhenSucceed': {{$.locale.Tr "repo.pulls.auto_merge_when_succeed"}}, 'textAutoMergeCancelSchedule': {{$.locale.Tr "repo.pulls.auto_merge_cancel_schedule"}}, + 'textMergeCommitId': {{$.locale.Tr "repo.pulls.merge_commit_id"}}, 'canMergeNow': {{$canMergeNow}}, 'allOverridableChecksOk': {{not $notAllOverridableChecksOk}}, diff --git a/web_src/js/components/PullRequestMergeForm.vue b/web_src/js/components/PullRequestMergeForm.vue index bfe05628e84aa..61c95477e7af7 100644 --- a/web_src/js/components/PullRequestMergeForm.vue +++ b/web_src/js/components/PullRequestMergeForm.vue @@ -28,6 +28,10 @@
+
+ +
+