Skip to content

Commit

Permalink
api: Support msgid and archive fields in 'pwclient list'
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
bebarino committed Dec 13, 2023
1 parent 6120b39 commit 191ba42
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pwclient/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 191ba42

Please sign in to comment.