diff options
author | Jason Song <i@wolfogre.com> | 2023-02-21 22:42:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-21 08:42:07 -0600 |
commit | c8c2a31818527f7377ddb9fb111a55d0c058ebe7 (patch) | |
tree | 5ebb1653b112dbf66e00d9ec34755382cfd5c6cf /web_src | |
parent | 1fcf96ad0166420cbdb013365ecae42e3537b42a (diff) | |
download | gitea-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.vue | 7 |
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) { |