summaryrefslogtreecommitdiff
path: root/lib/api/issues.rb
diff options
context:
space:
mode:
authorHeinrich Lee Yu <hleeyu@gmail.com>2018-10-25 15:02:28 +0800
committerHeinrich Lee Yu <hleeyu@gmail.com>2018-10-26 10:32:14 +0800
commit227e30f7feb2072407a231a762835bf8d5103129 (patch)
tree0773bb5752f5d32842be1176b6c2c7abf859fed3 /lib/api/issues.rb
parent679c0048a8f679aad456c02e30486150bbd0d93d (diff)
downloadgitlab-ce-227e30f7feb2072407a231a762835bf8d5103129.tar.gz
Issues API: Add None/Any option to assignee_id
Diffstat (limited to 'lib/api/issues.rb')
-rw-r--r--lib/api/issues.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/issues.rb b/lib/api/issues.rb
index 25d78053c88..89232212bc7 100644
--- a/lib/api/issues.rb
+++ b/lib/api/issues.rb
@@ -40,7 +40,11 @@ module API
optional :updated_after, type: DateTime, desc: 'Return issues updated after the specified time'
optional :updated_before, type: DateTime, desc: 'Return issues updated 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'
+ optional :assignee_id, types: [Integer, String],
+ values: -> (v) {
+ v.is_a?(Integer) or [IssuableFinder::FILTER_NONE, IssuableFinder::FILTER_ANY].include?(v)
+ },
+ desc: 'Return issues which are assigned to the user with the given ID'
optional :scope, type: String, values: %w[created-by-me assigned-to-me created_by_me assigned_to_me all],
desc: 'Return issues for the given scope: `created_by_me`, `assigned_to_me` or `all`'
optional :my_reaction_emoji, type: String, desc: 'Return issues reacted by the authenticated user by the given emoji'