From a920bbc2055a3e7d8ff01e1023600c58e9786212 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 24 Aug 2024 12:51:19 -0700 Subject: [PATCH] Adjust automerge buttons to reduce the steps and also fix cannot do automerge if there is only one mergestyle --- .../js/components/PullRequestMergeForm.vue | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/web_src/js/components/PullRequestMergeForm.vue b/web_src/js/components/PullRequestMergeForm.vue index fc9541b6a6..0386d226a5 100644 --- a/web_src/js/components/PullRequestMergeForm.vue +++ b/web_src/js/components/PullRequestMergeForm.vue @@ -22,6 +22,7 @@ export default { mergeTitleFieldText: '', mergeMessageFieldText: '', hideAutoMerge: false, + name: '', }, mergeStyleAllowedCount: 0, @@ -69,6 +70,10 @@ export default { this.mergeTitleFieldValue = this.mergeStyleDetail.mergeTitleFieldText; this.mergeMessageFieldValue = this.mergeStyleDetail.mergeMessageFieldText; }, + switchToActionform(mergeStyle, autoMerge) { + this.switchMergeStyle(mergeStyle, autoMerge); + this.toggleActionForm(true); + }, switchMergeStyle(name, autoMerge = false) { this.mergeStyle = name; this.autoMergeWhenSucceed = autoMerge; @@ -138,26 +143,30 @@ export default {
-
+
+