Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions patchwork/Patchwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ def search_patches(
archived=None,
hash=None,
msgid=None,
before=None,
since=None,
):
"""
List patches
Expand All @@ -277,6 +279,10 @@ def search_patches(
:type hash: string
:param msgid: The patch message-id as a case-sensitive string, without leading or trailing angle brackets, to filter by
:type msgid: string
:param before: Show patches with date before this date/time (ISO 8601 format)
:type before: string
:param since: Show patches with date after this date/time (ISO 8601 format)
:type since: string
:rtype: :class:`patchwork.Pagination.Pagination` of :class:`patchwork.Patch.Patch`
"""
# Check input parameters
Expand All @@ -289,6 +295,8 @@ def search_patches(
assert archived is None or isinstance(archived, bool)
assert hash is None or isinstance(hash, str)
assert msgid is None or isinstance(msgid, str)
assert before is None or isinstance(before, str)
assert since is None or isinstance(since, str)

# Build the parameters
params = {}
Expand All @@ -308,6 +316,10 @@ def search_patches(
params["msgid"] = msgid
if state is not None:
params["state"] = state
if before is not None:
params["before"] = before
if since is not None:
params["since"] = since

# If all parameters are empty, throws an exception.
# This is not what this function for...
Expand Down
Loading