summaryrefslogtreecommitdiff
path: root/lib/api/merge_requests.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-27 15:08:16 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-27 15:08:16 +0000
commitfb73ca3398c2ac49a616ab553e117b0586089702 (patch)
treec2f787ac97df38569c59cd0e967331ec1ead6d7e /lib/api/merge_requests.rb
parentb6b8f7dc871e73f29af55f06a773136a7242df57 (diff)
downloadgitlab-ce-fb73ca3398c2ac49a616ab553e117b0586089702.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.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb
index 794237f8032..0e161d5589a 100644
--- a/lib/api/merge_requests.rb
+++ b/lib/api/merge_requests.rb
@@ -157,11 +157,9 @@ module API
use :merge_requests_params
end
get ":id/merge_requests" do
- group = find_group!(params[:id])
+ merge_requests = find_merge_requests(group_id: user_group.id, include_subgroups: true)
- merge_requests = find_merge_requests(group_id: group.id, include_subgroups: true)
-
- present merge_requests, serializer_options_for(merge_requests)
+ present merge_requests, serializer_options_for(merge_requests).merge(group: user_group)
end
end
@@ -215,7 +213,7 @@ module API
merge_requests = find_merge_requests(project_id: user_project.id)
- options = serializer_options_for(merge_requests)
+ options = serializer_options_for(merge_requests).merge(project: user_project)
options[:project] = user_project
present merge_requests, options