Commit 7ab4efa8 authored by Sean McGivern's avatar Sean McGivern
Browse files

Merge branch '36262_merge_request_reference_in_merge_commit_global' into 'master'

fix Merge request reference in merge commit is not global

Closes #36262

See merge request !13518
......@@ -683,9 +683,8 @@ def merge_commit_message(include_description: false)
if !include_description && closes_issues_references.present?
message << "Closes #{closes_issues_references.to_sentence}"
end
message << "#{description}" if include_description && description.present?
message << "See merge request #{to_reference}"
message << "See merge request #{to_reference(full: true)}"
message.join("\n\n")
end
......
---
title: Merge request reference in merge commit changed to full reference
merge_request: 13518
author: haseebeqx
type: fixed
......@@ -19,7 +19,7 @@
"Merge branch 'feature' into 'master'",
merge_request.title,
"Closes #{issue_1.to_reference} and #{issue_2.to_reference}",
"See merge request #{merge_request.to_reference}"
"See merge request #{merge_request.to_reference(full: true)}"
].join("\n\n")
end
let(:message_with_description) do
......@@ -27,7 +27,7 @@
"Merge branch 'feature' into 'master'",
merge_request.title,
merge_request.description,
"See merge request #{merge_request.to_reference}"
"See merge request #{merge_request.to_reference(full: true)}"
].join("\n\n")
end
......
......@@ -604,7 +604,7 @@ def set_compare(merge_request)
request = build_stubbed(:merge_request)
expect(request.merge_commit_message)
.to match("See merge request #{request.to_reference}")
.to match("See merge request #{request.to_reference(full: true)}")
end
it 'excludes multiple linebreak runs when description is blank' do
......
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