Commit 2f76ccdf authored by Douwe Maan's avatar Douwe Maan

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

parent 1f617c3c
......@@ -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
......
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