summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-10-27 14:04:43 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-11-21 10:22:09 +0100
commit01f238893aaf8f5aa24eec7e33edc479d4e1315d (patch)
tree2a70dc5268343ad50a0d5bdff47853bf3a82482b /lib
parent900999f8180e49aa1677286e3e0cfa08d47829a7 (diff)
downloadgitlab-ce-01f238893aaf8f5aa24eec7e33edc479d4e1315d.tar.gz
Rename MWBS service to Merge When Pipeline Succeeds
Diffstat (limited to 'lib')
-rw-r--r--lib/api/merge_requests.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb
index 4176c7eec06..8c55f09a9ce 100644
--- a/lib/api/merge_requests.rb
+++ b/lib/api/merge_requests.rb
@@ -205,11 +205,13 @@ module API
}
if params[:merge_when_build_succeeds] && merge_request.pipeline && merge_request.pipeline.active?
- ::MergeRequests::MergeWhenBuildSucceedsService.new(merge_request.target_project, current_user, merge_params).
- execute(merge_request)
+ ::MergeRequests::MergeWhenPipelineSucceedsService
+ .new(merge_request.target_project, current_user, merge_params)
+ .execute(merge_request)
else
- ::MergeRequests::MergeService.new(merge_request.target_project, current_user, merge_params).
- execute(merge_request)
+ ::MergeRequests::MergeService
+ .new(merge_request.target_project, current_user, merge_params)
+ .execute(merge_request)
end
present merge_request, with: Entities::MergeRequest, current_user: current_user, project: user_project
@@ -223,7 +225,9 @@ module API
unauthorized! unless merge_request.can_cancel_merge_when_build_succeeds?(current_user)
- ::MergeRequest::MergeWhenBuildSucceedsService.new(merge_request.target_project, current_user).cancel(merge_request)
+ ::MergeRequest::MergeWhenPipelineSucceedsService
+ .new(merge_request.target_project, current_user)
+ .cancel(merge_request)
end
desc 'Get the comments of a merge request' do