summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/merge_requests.rb18
-rw-r--r--lib/api/pipelines.rb4
-rw-r--r--lib/api/v3/merge_requests.rb18
3 files changed, 20 insertions, 20 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb
index bdd764abfeb..6a2476424a7 100644
--- a/lib/api/merge_requests.rb
+++ b/lib/api/merge_requests.rb
@@ -193,13 +193,13 @@ module API
}
if params[:merge_when_build_succeeds] && merge_request.head_pipeline && merge_request.head_pipeline.active?
- ::MergeRequests::MergeWhenPipelineSucceedsService
- .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
@@ -213,9 +213,9 @@ module API
unauthorized! unless merge_request.can_cancel_merge_when_build_succeeds?(current_user)
- ::MergeRequest::MergeWhenPipelineSucceedsService
- .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
diff --git a/lib/api/pipelines.rb b/lib/api/pipelines.rb
index f59f7959173..ffa73696029 100644
--- a/lib/api/pipelines.rb
+++ b/lib/api/pipelines.rb
@@ -36,8 +36,8 @@ module API
new_pipeline = Ci::CreatePipelineService.new(user_project,
current_user,
- declared_params(include_missing: false))
- .execute(ignore_skip_ci: true, save_on_errors: false)
+ declared_params(include_missing: false)).
+ execute(ignore_skip_ci: true, save_on_errors: false)
if new_pipeline.persisted?
present new_pipeline, with: Entities::Pipeline
else
diff --git a/lib/api/v3/merge_requests.rb b/lib/api/v3/merge_requests.rb
index 129f9d850e9..5a8dacc9c44 100644
--- a/lib/api/v3/merge_requests.rb
+++ b/lib/api/v3/merge_requests.rb
@@ -200,13 +200,13 @@ module API
}
if params[:merge_when_build_succeeds] && merge_request.head_pipeline && merge_request.head_pipeline.active?
- ::MergeRequests::MergeWhenPipelineSucceedsService
- .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: ::API::Entities::MergeRequest, current_user: current_user, project: user_project
@@ -220,9 +220,9 @@ module API
unauthorized! unless merge_request.can_cancel_merge_when_build_succeeds?(current_user)
- ::MergeRequest::MergeWhenPipelineSucceedsService
- .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