Fix incorrect default merge request title when external issue tracker is activated
This commit is contained in:
parent
639cfdc221
commit
44c8f919b4
3 changed files with 8 additions and 3 deletions
|
@ -159,7 +159,7 @@ module MergeRequests
|
|||
merge_request.title =
|
||||
case issue
|
||||
when Issue then "Resolve \"#{issue.title}\""
|
||||
when ExternalIssue then "Resolve #{issue.title}"
|
||||
when ExternalIssue then merge_request.source_branch.titleize.humanize
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Default merge request title is set correctly again when external issue tracker is activated
|
||||
merge_request:
|
||||
author:
|
||||
type: fixed
|
|
@ -241,8 +241,8 @@ describe MergeRequests::BuildService do
|
|||
allow(project).to receive(:external_issue_tracker).and_return(true)
|
||||
end
|
||||
|
||||
it 'sets the title to: Resolves External Issue $issue-iid' do
|
||||
expect(merge_request.title).to eq('Resolve External Issue 12345')
|
||||
it 'sets the title to the humanized branch title' do
|
||||
expect(merge_request.title).to eq('12345 fix issue')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue