Commit 09d24a1f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Better title suggestion for new MR

Ex. if branch named "refactor-models" then title will be "Refactor models"
Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 973f9d30
...@@ -20,7 +20,7 @@ module MergeRequestsHelper ...@@ -20,7 +20,7 @@ module MergeRequestsHelper
target_project_id: target_project.id, target_project_id: target_project.id,
source_branch: event.branch_name, source_branch: event.branch_name,
target_branch: target_project.repository.root_ref, target_branch: target_project.repository.root_ref,
title: event.branch_name.humanize title: event.branch_name.titleize.humanize
} }
end end
......
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
var mrTitle = $('#merge_request_title'); var mrTitle = $('#merge_request_title');
if(mrTitle.val().length == 0) { if(mrTitle.val().length == 0) {
mrTitle.val("#{params[:ref].humanize}"); mrTitle.val("#{params[:ref].titleize.humanize}");
} }
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