summaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorJason Song <i@wolfogre.com>2023-02-21 22:42:07 +0800
committerGitHub <noreply@github.com>2023-02-21 08:42:07 -0600
commitc8c2a31818527f7377ddb9fb111a55d0c058ebe7 (patch)
tree5ebb1653b112dbf66e00d9ec34755382cfd5c6cf /web_src
parent1fcf96ad0166420cbdb013365ecae42e3537b42a (diff)
downloadgitea-c8c2a31818527f7377ddb9fb111a55d0c058ebe7.tar.gz
gitea-c8c2a31818527f7377ddb9fb111a55d0c058ebe7.zip
Add force_merge to merge request and fix checking mergable (#23010)
Fix #23000.
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/components/PullRequestMergeForm.vue7
1 files changed, 6 insertions, 1 deletions
diff --git a/web_src/js/components/PullRequestMergeForm.vue b/web_src/js/components/PullRequestMergeForm.vue
index bc960c1e70..fc610d2194 100644
--- a/web_src/js/components/PullRequestMergeForm.vue
+++ b/web_src/js/components/PullRequestMergeForm.vue
@@ -18,6 +18,7 @@
<input type="hidden" name="_csrf" :value="csrfToken">
<input type="hidden" name="head_commit_id" v-model="mergeForm.pullHeadCommitID">
<input type="hidden" name="merge_when_checks_succeed" v-model="autoMergeWhenSucceed">
+ <input type="hidden" name="force_merge" v-model="forceMerge">
<template v-if="!mergeStyleDetail.hideMergeMessageTexts">
<div class="field">
@@ -131,6 +132,7 @@ export default {
textDoMerge: '',
mergeTitleFieldText: '',
mergeMessageFieldText: '',
+ hideAutoMerge: false,
},
mergeStyleAllowedCount: 0,
@@ -141,7 +143,10 @@ export default {
mergeButtonStyleClass() {
if (this.mergeForm.allOverridableChecksOk) return 'green';
return this.autoMergeWhenSucceed ? 'blue' : 'red';
- }
+ },
+ forceMerge() {
+ return this.mergeForm.canMergeNow && !this.mergeForm.allOverridableChecksOk;
+ },
},
watch: {
mergeStyle(val) {