From b9d5451b8f89d682068e80f9e90d31eab0ea985e Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 21 Feb 2023 18:04:29 +0800 Subject: [PATCH] Fix the Manually Merged form (#23015) (#23017) Backport #23015 --------- Co-authored-by: Jason Song (cherry picked from commit 7b3ffe5745152513468adbeaae1102a27c30b67b) --- templates/repo/issue/view_content/pull.tmpl | 20 +++++++------------ .../js/components/PullRequestMergeForm.vue | 4 ++++ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl index 1e07225300..d765daf322 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}}
@@ -351,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}}, @@ -410,6 +412,7 @@ })(); + {{$showGeneralMergeForm = true}}
{{if .ShowMergeInstructions}} @@ -487,30 +490,21 @@ {{$.locale.Tr "repo.pulls.cannot_auto_merge_helper"}}
{{end}} - {{end}} + {{end}}{{/* end if: pull request status */}} - {{if $.StillCanManualMerge}} + {{if and $.StillCanManualMerge (not $showGeneralMergeForm)}}
-
diff --git a/web_src/js/components/PullRequestMergeForm.vue b/web_src/js/components/PullRequestMergeForm.vue index bfe05628e8..61c95477e7 100644 --- a/web_src/js/components/PullRequestMergeForm.vue +++ b/web_src/js/components/PullRequestMergeForm.vue @@ -28,6 +28,10 @@
+
+ +
+