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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
8830cfaa
Commit
8830cfaa
authored
Feb 20, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Base new MR title on commit title if there's only one.
parent
6b0199ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
app/services/merge_requests/build_service.rb
app/services/merge_requests/build_service.rb
+8
-3
No files found.
app/services/merge_requests/build_service.rb
View file @
8830cfaa
...
...
@@ -16,9 +16,6 @@ module MergeRequests
return
build_failed
(
merge_request
,
nil
)
end
# Generate suggested MR title based on source branch name
merge_request
.
title
=
merge_request
.
source_branch
.
titleize
.
humanize
compare_result
=
CompareService
.
new
.
execute
(
current_user
,
merge_request
.
source_project
,
...
...
@@ -52,6 +49,14 @@ module MergeRequests
merge_request
.
compare_failed
=
false
end
commits
=
merge_request
.
compare_commits
merge_request
.
title
=
\
if
commits
&&
commits
.
count
==
1
commits
.
first
.
title
else
merge_request
.
source_branch
.
titleize
.
humanize
end
merge_request
rescue
Gitlab
::
Satellite
::
BranchesWithoutParent
...
...
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