Commit 93de37ce authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'bug/api_milestone_merge_requests_scope' into 'master'

Fixes milestone/merge_request API endpoint to really scope the results

See merge request !10369
parents 93e36d56 d663b8de
......@@ -9,7 +9,7 @@
# state: 'open' or 'closed' or 'all'
# group_id: integer
# project_id: integer
# milestone_id: integer
# milestone_title: string
# assignee_id: integer
# search: string
# label_name: string
......
......@@ -9,7 +9,7 @@
# state: 'open' or 'closed' or 'all'
# group_id: integer
# project_id: integer
# milestone_id: integer
# milestone_title: string
# assignee_id: integer
# search: string
# label_name: string
......
---
title: Fixes milestone/merge_requests endpoint to actually scope the result
merge_request:
author: Joren De Groof
......@@ -139,7 +139,7 @@ module API
finder_params = {
project_id: user_project.id,
milestone_id: milestone.id,
milestone_title: milestone.title,
sort: 'position_asc'
}
......
......@@ -306,6 +306,8 @@ describe API::Milestones, api: true do
end
it 'returns project merge_requests for a particular milestone' do
# eager-load another_merge_request
another_merge_request
get api("/projects/#{project.id}/milestones/#{milestone.id}/merge_requests", user)
expect(response).to have_http_status(200)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment