[Patchew-devel] [PATCH] search: add "queue" search term

Paolo Bonzini posted 1 patch 2 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/patchew-ci tags/patchew/20220222102126.166482-3-pbonzini@redhat.com
api/search.py | 4 ++++
1 file changed, 4 insertions(+)
[Patchew-devel] [PATCH] search: add "queue" search term
Posted by Paolo Bonzini 2 years, 8 months ago
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 api/search.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/api/search.py b/api/search.py
index 5d4529d..08b40c3 100644
--- a/api/search.py
+++ b/api/search.py
@@ -178,6 +178,7 @@ Syntax:
  - reject:USERNAME or nack:USERNAME - the series was marked as reject by the user
  - review:USERNAME - the series was marked as accepted or rejected by the user
  - watch:USERNAME - the series is in the user's watched queue
+ - queue:NAME - the series is in the given queue of the current user
 
 USERNAME can be "me" to identify the current user
 
@@ -352,6 +353,9 @@ Search text keyword in the email message. Example:
         ):
             username = term[term.find(":") + 1 :]
             return self._make_filter_queue(username, user, name="reject")
+        elif term.startswith("queue:"):
+            name = term[term.find(":") + 1 :]
+            return self._make_filter_queue("me", user, name=name)
         elif term.startswith("review:") or term.startswith("reviewed:"):
             username = term[term.find(":") + 1 :]
             return self._make_filter_queue(
-- 
2.34.1

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/patchew-devel