Commit c290e22a authored by Alain Takoudjou's avatar Alain Takoudjou

NXD: Use merge description message as merge message by default

Include Merge description message in merge by default. User can disable description in merge message by clicking on `Don't include description in commit message`.

Drop the merge title which is "Merge branch SOURCE into TARGET" and only keep the MR title as commit message.
parent fde4c39c
......@@ -15,12 +15,12 @@ export default {
return {
removeSourceBranch: this.mr.shouldRemoveSourceBranch,
mergeWhenBuildSucceeds: false,
useCommitMessageWithDescription: false,
useCommitMessageWithDescription: true,
setToMergeWhenPipelineSucceeds: false,
showCommitMessageEditor: false,
isMakingRequest: false,
isMergingImmediately: false,
commitMessage: this.mr.commitMessage,
commitMessage: this.mr.commitMessageWithDescription,
successSvg,
warningSvg,
};
......
......@@ -678,7 +678,8 @@ class MergeRequest < ActiveRecord::Base
end
message = [
"Merge branch '#{source_branch}' into '#{target_branch}'",
# NXD: We only want to keep the original MR title
#"Merge branch '#{source_branch}' into '#{target_branch}'",
title
]
......
......@@ -7,7 +7,7 @@
.commit-message-container
.max-width-marker
= text_area_tag 'commit_message',
(params[:commit_message] || local_assigns[:text] || local_assigns[:placeholder]),
(local_assigns[:message_with_description] || params[:commit_message] || local_assigns[:text] || local_assigns[:placeholder]),
class: 'form-control js-commit-message', placeholder: local_assigns[:placeholder],
data: descriptions,
required: true, rows: (local_assigns[:rows] || 3),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment