Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
b4764a8d
Commit
b4764a8d
authored
Nov 25, 2016
by
Gabriel Gizotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shorter lines on MergeRequest#merge_commit_message
parent
0e76daf3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
app/models/merge_request.rb
app/models/merge_request.rb
+9
-2
No files found.
app/models/merge_request.rb
View file @
b4764a8d
...
...
@@ -631,10 +631,17 @@ class MergeRequest < ActiveRecord::Base
end
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
<<
"
#{
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment