summaryrefslogtreecommitdiff
path: root/lib/api/milestones.rb
diff options
context:
space:
mode:
authorJustin Whear <justin@economicmodeling.com>2014-06-02 16:10:38 -0700
committerHannes Rosenögger <123haynes@gmail.com>2015-01-22 12:08:45 +0100
commit9d271538a8e9ddff892a084e5c8a881bf2fdb0b0 (patch)
treeb52b11c433b0e0191c0257094021034ecc653e0e /lib/api/milestones.rb
parent2b10520b306697d7cbae8f3f84ca30cacc821fa4 (diff)
downloadgitlab-ce-9d271538a8e9ddff892a084e5c8a881bf2fdb0b0.tar.gz
Add per-milestone issues API call
Diffstat (limited to 'lib/api/milestones.rb')
-rw-r--r--lib/api/milestones.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/api/milestones.rb b/lib/api/milestones.rb
index 2ea49359df0..ca01fa4a57d 100644
--- a/lib/api/milestones.rb
+++ b/lib/api/milestones.rb
@@ -75,6 +75,21 @@ module API
render_api_error!("Failed to update milestone #{milestone.errors.messages}", 400)
end
end
+
+ # Get all issues for single project milestone
+ #
+ # Parameters:
+ # id (required) - The ID of a project
+ # milestone_id (required) - The ID of a project milestone
+ # Example Request:
+ # GET /projects/:id/milestones/:milestone_id/issues
+ get ":id/milestones/:milestone_id/issues" do
+ authorize! :read_milestone, user_project
+
+ @milestone = user_project.milestones.find(params[:milestone_id])
+ present paginate(@milestone.issues), with: Entities::Issue
+ end
+
end
end
end