diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-30 15:09:15 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-30 15:09:15 +0000 |
commit | 536aa3a1f4b96abc4ca34489bf2cbe503afcded7 (patch) | |
tree | 88d08f7dfa29a32d6526773c4fe0fefd9f2bc7d1 /lib/api/merge_requests.rb | |
parent | 50ae4065530c4eafbeb7c5ff2c462c48c02947ca (diff) | |
download | gitlab-ce-536aa3a1f4b96abc4ca34489bf2cbe503afcded7.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/merge_requests.rb')
-rw-r--r-- | lib/api/merge_requests.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb index 6397a376af7..c4ab84c5200 100644 --- a/lib/api/merge_requests.rb +++ b/lib/api/merge_requests.rb @@ -293,7 +293,7 @@ module API end desc 'Get the context commits of a merge request' do - success Entities::CommitEntity + success Entities::Commit end get ':id/merge_requests/:merge_request_iid/context_commits' do merge_request = find_merge_request_with_access(params[:merge_request_iid]) @@ -301,8 +301,10 @@ module API not_found! unless project.context_commits_enabled? - context_commits = merge_request.context_commits - CommitEntity.represent(context_commits, type: :full, request: merge_request) + context_commits = + paginate(merge_request.merge_request_context_commits).map(&:to_commit) + + present context_commits, with: Entities::Commit end params do |