diff options
Diffstat (limited to 'lib/api/v3')
-rw-r--r-- | lib/api/v3/issues.rb | 6 | ||||
-rw-r--r-- | lib/api/v3/merge_requests.rb | 18 |
2 files changed, 12 insertions, 12 deletions
diff --git a/lib/api/v3/issues.rb b/lib/api/v3/issues.rb index d0af09f0e1e..264ad8d0da5 100644 --- a/lib/api/v3/issues.rb +++ b/lib/api/v3/issues.rb @@ -141,9 +141,9 @@ module API issue_params = declared_params(include_missing: false) if merge_request_iid = params[:merge_request_for_resolving_discussions] - issue_params[:merge_request_for_resolving_discussions] = MergeRequestsFinder.new(current_user, project_id: user_project.id). - execute. - find_by(iid: merge_request_iid) + issue_params[:merge_request_for_resolving_discussions] = MergeRequestsFinder.new(current_user, project_id: user_project.id) + .execute + .find_by(iid: merge_request_iid) end issue = ::Issues::CreateService.new(user_project, diff --git a/lib/api/v3/merge_requests.rb b/lib/api/v3/merge_requests.rb index 5a8dacc9c44..129f9d850e9 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 |