diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-28 00:08:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-28 00:08:47 +0300 |
commit | e4ea43b2b85ad5f3115f00220601eb719705139a (patch) | |
tree | 1888a43f802e45ebb8dfed59595a790807777c6f /app/assets/javascripts/vue_merge_request_widget | |
parent | 390582e118752426acf5cb25ec99103d312d891c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_merge_request_widget')
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue index d230ac566de..66167a0d748 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue @@ -146,9 +146,15 @@ export default { auto_merge_strategy: useAutoMerge ? this.mr.preferredAutoMergeStrategy : undefined, should_remove_source_branch: this.removeSourceBranch === true, squash: this.squashBeforeMerge, - squash_commit_message: this.squashCommitMessage, }; + // If users can't alter the squash message (e.g. for 1-commit merge requests), + // we shouldn't send the commit message because that would make the backend + // do unnecessary work. + if (this.shouldShowSquashBeforeMerge) { + options.squash_commit_message = this.squashCommitMessage; + } + this.isMakingRequest = true; this.service .merge(options) |