From 8bf89cb4aba188cd9abc41bb9eefb92458cfb75b Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Thu, 20 Jul 2017 22:44:48 +0200 Subject: Add author_id & assignee_id param to /issues API Allow issues filtering on `author_id` and `assignee_id`. --- lib/api/issues.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/api') diff --git a/lib/api/issues.rb b/lib/api/issues.rb index 14b26f28ebf..621539afeaf 100644 --- a/lib/api/issues.rb +++ b/lib/api/issues.rb @@ -8,6 +8,9 @@ module API def find_issues(args = {}) args = params.merge(args) + # Do not scope to "authored" when author or assignee id is given + args.delete(:scope) if args[:author_id] || args[:assignee_id] + args.delete(:id) args[:milestone_title] = args.delete(:milestone) args[:label_name] = args.delete(:labels) @@ -29,6 +32,8 @@ module API optional :search, type: String, desc: 'Search issues for text present in the title or description' optional :created_after, type: DateTime, desc: 'Return issues created after the specified time' optional :created_before, type: DateTime, desc: 'Return issues created before the specified time' + optional :author_id, type: Integer, desc: 'Return issues which are authored by the user with the given ID' + optional :assignee_id, type: Integer, desc: 'Return issues which are assigned to the user with the given ID' use :pagination end -- cgit v1.2.3