Merge branch 'mr-body-single-commit' into 'master'

Base new MR description on commit description if there's only one.

Closes #2029, again.

See merge request !1561
This commit is contained in:
Dmitriy Zaporozhets 2015-02-20 23:33:23 +00:00
commit b180476bd6

View file

@ -50,11 +50,12 @@ module MergeRequests
end
commits = merge_request.compare_commits
merge_request.title = \
if commits && commits.count == 1
commits.first.title
commit = commits.first
merge_request.title = commit.title
merge_request.description = commit.description.try(:strip)
else
merge_request.source_branch.titleize.humanize
merge_request.title = merge_request.source_branch.titleize.humanize
end
merge_request