diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-05-31 17:18:27 -0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-05-31 19:16:01 -0300 |
commit | 4246a62118d919e62b94d75eba641ed374c3f241 (patch) | |
tree | 37ef42f76b66b642c88edf3f2a24da34a0f24047 /lib/api/merge_requests.rb | |
parent | 96db70a4448fd1e736c10100dccf3a803ec553c0 (diff) | |
download | gitlab-ce-4246a62118d919e62b94d75eba641ed374c3f241.tar.gz |
Add payload to the service response
This introduces payload to the ServiceResponse with
the merge ref HEAD commit data
Diffstat (limited to 'lib/api/merge_requests.rb')
-rw-r--r-- | lib/api/merge_requests.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb index a1365d5c02b..0a9fe450500 100644 --- a/lib/api/merge_requests.rb +++ b/lib/api/merge_requests.rb @@ -404,8 +404,8 @@ module API result = ::MergeRequests::MergeabilityCheckService.new(merge_request).execute - if result.success? && commit = merge_request.merge_ref_head - present :commit_id, commit.sha + if result.success? + present :commit_id, result.payload.dig(:merge_ref_head, :commit_id) else render_api_error!(result.message, 400) end |