diff options
author | Vitaliy @blackst0ne Klachkov <blackst0ne.ru@gmail.com> | 2017-11-25 14:33:05 +0300 |
---|---|---|
committer | Vitaliy @blackst0ne Klachkov <blackst0ne.ru@gmail.com> | 2017-11-25 14:33:05 +0300 |
commit | 5bc32b65f1257ca1f2c9fefc1e251be55b0fdc17 (patch) | |
tree | fb151281e290217a4b677c5e648e793ac41cc053 /app/controllers/projects/issues_controller.rb | |
parent | acae8ddb34e5f7119edba8a40556ceff99dd64aa (diff) |
Add an ability to use a custom branch name on creation from issues
Diffstat (limited to 'app/controllers/projects/issues_controller.rb')
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 28fee0465d5..d7a3441a245 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -158,7 +158,8 @@ class Projects::IssuesController < Projects::ApplicationController end def create_merge_request - result = ::MergeRequests::CreateFromIssueService.new(project, current_user, issue_iid: issue.iid).execute + create_params = params.slice(:branch_name, :ref).merge(issue_iid: issue.iid) + result = ::MergeRequests::CreateFromIssueService.new(project, current_user, create_params).execute if result[:status] == :success render json: MergeRequestCreateSerializer.new.represent(result[:merge_request]) |