diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-07-13 18:36:57 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-07-13 18:36:57 +0300 |
commit | cca3d9bf671abe41b51c4615c0d9b7df7f5bb776 (patch) | |
tree | a0ad340b17166ae74ad23c93f14661033dd9080a /app | |
parent | 48b976e0973066ebf2f2ffd01b1bb4a7e9d4d040 (diff) | |
parent | 3ef80368839b9d295bfdf2b75b5ced1748884d0d (diff) |
Merge branch 'backport-mr-create-service-changes' into 'master'
Backport MR create service changes from EE
See merge request !12808
Diffstat (limited to 'app')
-rw-r--r-- | app/services/merge_requests/create_service.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/services/merge_requests/create_service.rb b/app/services/merge_requests/create_service.rb index 71d37797bb4..19189e64acf 100644 --- a/app/services/merge_requests/create_service.rb +++ b/app/services/merge_requests/create_service.rb @@ -7,9 +7,8 @@ module MergeRequests source_project = @project @project = Project.find(params[:target_project_id]) if params[:target_project_id] - params[:target_project_id] ||= source_project.id - merge_request = MergeRequest.new + merge_request.target_project = @project merge_request.source_project = source_project merge_request.source_branch = params[:source_branch] merge_request.merge_params['force_remove_source_branch'] = params.delete(:force_remove_source_branch) |