Commit 5bb5019e authored by Rubén Dávila's avatar Rubén Dávila Committed by Robert Speicher

Use adequate description for new MR.

parent 0b7d70a3
......@@ -200,7 +200,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
source_branch: @merge_request.revert_branch_name,
target_branch: @merge_request.target_branch,
source_project_id: @merge_request.target_project_id,
target_project_id: @merge_request.target_project_id
target_project_id: @merge_request.target_project_id,
description: "Reverts #{@merge_request.to_reference}"
}}
redirect_to new_namespace_project_merge_request_url(@project.namespace, @project, url_params)
......
......@@ -56,7 +56,7 @@ module MergeRequests
if commits && commits.count == 1
commit = commits.first
merge_request.title = commit.title
merge_request.description = commit.description.try(:strip)
merge_request.description ||= commit.description.try(:strip)
else
merge_request.title = merge_request.source_branch.titleize.humanize
end
......
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