BigW Consortium Gitlab

Commit d663b8de by Joren De Groof

Fixes milestone/merge_request API endpoint to really scope the results

The MergeRequestsFinder uses the milestone_title instead of the milestone_id
parent 2faf955c
......@@ -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