diff options
author | Toon Claes <toon@iotcl.com> | 2017-07-20 22:44:48 +0200 |
---|---|---|
committer | Toon Claes <toon@iotcl.com> | 2017-07-24 22:16:14 +0200 |
commit | 8bf89cb4aba188cd9abc41bb9eefb92458cfb75b (patch) | |
tree | e45773acb605ebf1c77d3947b9d2aaebe129c479 /lib/api/issues.rb | |
parent | ea6dfcad9fdb2c673c1074c6d99ff1cca42d680a (diff) | |
download | gitlab-ce-8bf89cb4aba188cd9abc41bb9eefb92458cfb75b.tar.gz |
Add author_id & assignee_id param to /issues API
Allow issues filtering on `author_id` and `assignee_id`.
Diffstat (limited to 'lib/api/issues.rb')
-rw-r--r-- | lib/api/issues.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 |