summaryrefslogtreecommitdiff
path: root/lib/api/issues.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/issues.rb')
-rw-r--r--lib/api/issues.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/api/issues.rb b/lib/api/issues.rb
index ff062be6040..c8db93eb778 100644
--- a/lib/api/issues.rb
+++ b/lib/api/issues.rb
@@ -51,6 +51,7 @@ module API
#
# Parameters:
# id (required) - The ID of a project
+ # iid (optional) - Return the project issue having the given `iid`
# state (optional) - Return "opened" or "closed" issues
# labels (optional) - Comma-separated list of label names
# milestone (optional) - Milestone title
@@ -66,10 +67,12 @@ module API
# GET /projects/:id/issues?labels=foo,bar&state=opened
# GET /projects/:id/issues?milestone=1.0.0
# GET /projects/:id/issues?milestone=1.0.0&state=closed
+ # GET /issues?iid=42
get ":id/issues" do
issues = user_project.issues
issues = filter_issues_state(issues, params[:state]) unless params[:state].nil?
issues = filter_issues_labels(issues, params[:labels]) unless params[:labels].nil?
+ issues = filter_by_iid(issues, params[:iid]) unless params[:iid].nil?
unless params[:milestone].nil?
issues = filter_issues_milestone(issues, params[:milestone])