Commit b4764a8d authored by Gabriel Gizotti's avatar Gabriel Gizotti

shorter lines on MergeRequest#merge_commit_message

parent 0e76daf3
...@@ -631,10 +631,17 @@ class MergeRequest < ActiveRecord::Base ...@@ -631,10 +631,17 @@ class MergeRequest < ActiveRecord::Base
end end
def merge_commit_message def merge_commit_message
closes_issues_references = closes_issues.map do |issue|
issue.to_reference(target_project)
end
message = "Merge branch '#{source_branch}' into '#{target_branch}'\n\n" message = "Merge branch '#{source_branch}' into '#{target_branch}'\n\n"
message << "#{title}\n\n" message << "#{title}\n\n"
mr_closes_issues = closes_issues
message << "Closed Issues: #{mr_closes_issues.map { |issue| issue.to_reference(target_project) }.join(", ")}\n\n" if mr_closes_issues.present? if closes_issues_references.present?
message << "Closed Issues: #{closes_issues_references.join(", ")}\n\n"
end
message << "See merge request #{to_reference}" message << "See merge request #{to_reference}"
message message
......
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