summaryrefslogtreecommitdiff
path: root/lib/api/merge_requests.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-08 21:06:38 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-08 21:06:38 +0000
commitae72d71da85732ec9ceb9723953fe6ca1df0fdf6 (patch)
tree9e1096312c5fc03a7657ae9586a6714f04ddf8ad /lib/api/merge_requests.rb
parent759bab058520a21d87087355dc193f634176e98a (diff)
downloadgitlab-ce-ae72d71da85732ec9ceb9723953fe6ca1df0fdf6.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.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb
index a18380586a7..47ee81c7080 100644
--- a/lib/api/merge_requests.rb
+++ b/lib/api/merge_requests.rb
@@ -296,9 +296,12 @@ module API
end
get ':id/merge_requests/:merge_request_iid/commits' do
merge_request = find_merge_request_with_access(params[:merge_request_iid])
- commits = ::Kaminari.paginate_array(merge_request.commits)
- present paginate(commits), with: Entities::Commit
+ commits =
+ paginate(merge_request.merge_request_diff.merge_request_diff_commits)
+ .map { |commit| Commit.from_hash(commit.to_hash, merge_request.project) }
+
+ present commits, with: Entities::Commit
end
desc 'Show the merge request changes' do