From 3cbc0097d515b957f52470438a53bd3a22304713 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 21 Feb 2023 01:25:05 +0800 Subject: [PATCH 1/2] revert the Manually Merged form --- 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 cbcc163df1314..dbf5f712361d2 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}}
@@ -379,6 +380,7 @@ window.config.pageData.pullRequestMergeForm = mergeForm; + {{$showGeneralMergeForm = true}}
{{else}} {{/* no merge style was set in repo setting: not or ($prUnit.PullRequestsConfig.AllowMerge ...) */}} @@ -452,30 +454,21 @@ {{$.locale.Tr "repo.pulls.cannot_auto_merge_helper"}}
{{end}} - {{end}} + {{end}}{{/* end if: pull request status */}} - {{if $.StillCanManualMerge}} + {{if and $.StillCanManualMerge (not $showGeneralMergeForm)}}
-
+
{{.CsrfTokenHtml}}
- +
-
- -
- -
{{end}} {{if and .ShowMergeInstructions .Issue.PullRequest.HeadRepo}} From 5582faf6915e75cb537a269e5e8e3994910fed07 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 dbf5f712361d2..f0bf23c9e95f0 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull.tmpl @@ -321,6 +321,7 @@ 'textAutoMergeCancelSchedule': {{$.locale.Tr "repo.pulls.auto_merge_cancel_schedule"}}, 'textClearMergeMessage': {{$.locale.Tr "repo.pulls.clear_merge_message"}}, 'textClearMergeMessageHint': {{$.locale.Tr "repo.pulls.clear_merge_message_hint"}}, + '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 2e10ce2531f06..bc960c1e70130 100644 --- a/web_src/js/components/PullRequestMergeForm.vue +++ b/web_src/js/components/PullRequestMergeForm.vue @@ -36,6 +36,10 @@
+
+ +
+