summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswaldo@gitlab.com>2019-05-30 20:25:25 +0000
committerOswaldo Ferreira <oswaldo@gitlab.com>2019-05-31 19:16:01 -0300
commit96db70a4448fd1e736c10100dccf3a803ec553c0 (patch)
tree8d673cc15dc4db7ec1b7a809a5d0b3db7964b01a /lib
parentb965009ddddcd50e76841dbc97d2767292e88a0a (diff)
downloadgitlab-ce-96db70a4448fd1e736c10100dccf3a803ec553c0.tar.gz
Simplify merge_ref_head methods
Diffstat (limited to 'lib')
-rw-r--r--lib/api/merge_requests.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb
index 59b5346ffbb..a1365d5c02b 100644
--- a/lib/api/merge_requests.rb
+++ b/lib/api/merge_requests.rb
@@ -398,11 +398,11 @@ module API
present merge_request, with: Entities::MergeRequest, current_user: current_user, project: user_project
end
- desc 'Returns an up to date merge-ref HEAD'
+ desc 'Returns the up to date merge-ref HEAD commit'
get ':id/merge_requests/:merge_request_iid/merge_ref' do
merge_request = find_project_merge_request(params[:merge_request_iid])
- result = merge_request.check_mergeability
+ result = ::MergeRequests::MergeabilityCheckService.new(merge_request).execute
if result.success? && commit = merge_request.merge_ref_head
present :commit_id, commit.sha