BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
d663b8de
Commit
d663b8de
authored
Mar 31, 2017
by
Joren De Groof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes milestone/merge_request API endpoint to really scope the results
The MergeRequestsFinder uses the milestone_title instead of the milestone_id
parent
2faf955c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
3 deletions
+9
-3
issues_finder.rb
app/finders/issues_finder.rb
+1
-1
merge_requests_finder.rb
app/finders/merge_requests_finder.rb
+1
-1
bug-api_milestone_merge_requests_scope.yml
...ogs/unreleased/bug-api_milestone_merge_requests_scope.yml
+4
-0
milestones.rb
lib/api/milestones.rb
+1
-1
milestones_spec.rb
spec/requests/api/milestones_spec.rb
+2
-0
No files found.
app/finders/issues_finder.rb
View file @
d663b8de
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
# state: 'open' or 'closed' or 'all'
# state: 'open' or 'closed' or 'all'
# group_id: integer
# group_id: integer
# project_id: integer
# project_id: integer
# milestone_
id: integer
# milestone_
title: string
# assignee_id: integer
# assignee_id: integer
# search: string
# search: string
# label_name: string
# label_name: string
...
...
app/finders/merge_requests_finder.rb
View file @
d663b8de
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
# state: 'open' or 'closed' or 'all'
# state: 'open' or 'closed' or 'all'
# group_id: integer
# group_id: integer
# project_id: integer
# project_id: integer
# milestone_
id: integer
# milestone_
title: string
# assignee_id: integer
# assignee_id: integer
# search: string
# search: string
# label_name: string
# label_name: string
...
...
changelogs/unreleased/bug-api_milestone_merge_requests_scope.yml
0 → 100644
View file @
d663b8de
---
title
:
Fixes milestone/merge_requests endpoint to actually scope the result
merge_request
:
author
:
Joren De Groof
lib/api/milestones.rb
View file @
d663b8de
...
@@ -139,7 +139,7 @@ module API
...
@@ -139,7 +139,7 @@ module API
finder_params
=
{
finder_params
=
{
project_id:
user_project
.
id
,
project_id:
user_project
.
id
,
milestone_
id:
milestone
.
id
,
milestone_
title:
milestone
.
title
,
sort:
'position_asc'
sort:
'position_asc'
}
}
...
...
spec/requests/api/milestones_spec.rb
View file @
d663b8de
...
@@ -306,6 +306,8 @@ describe API::Milestones, api: true do
...
@@ -306,6 +306,8 @@ describe API::Milestones, api: true do
end
end
it
'returns project merge_requests for a particular milestone'
do
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
)
get
api
(
"/projects/
#{
project
.
id
}
/milestones/
#{
milestone
.
id
}
/merge_requests"
,
user
)
expect
(
response
).
to
have_http_status
(
200
)
expect
(
response
).
to
have_http_status
(
200
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment