From cc1f5ff605be141e1b51ff468fec640b8eadb0c6 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Tue, 12 Dec 2023 18:21:18 -0800 Subject: [PATCH] api: Support msgid and archive fields in 'pwclient list' I regularly use commands like pwclient list -m "msgid" -f'%{id}' to find the patchwork id for a particular patch. According to the help this is supported, but the -m commandline argument is silently ignored in the REST API. Add support for this so the list command continues to work. Similarly, add support for the archive argument '-a'. Signed-off-by: Stephen Boyd --- pwclient/api.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pwclient/api.py b/pwclient/api.py index 427395b..3b7cf59 100644 --- a/pwclient/api.py +++ b/pwclient/api.py @@ -742,6 +742,12 @@ def patch_list( if hash is not None: filters['hash'] = hash + if msgid is not None: + filters['msgid'] = msgid + + if archived is not None: + filters['archived'] = archived + patches = self._list('patches', params=filters) return [self._patch_to_dict(patch) for patch in patches]