Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle the pagination Link headers for _list requests
The patchwork REST API defaults to sending a maximum of 30 items for API requests which return a list. This makes pwclient list fail to return more than 30 items when using the REST API. To handle this, the API includes 'Link' headers in the response which indicate whether there is more data and what URL the data is available at. Processing the Link header is done automatically by the requests library. Handle this in the _list implementation by checking whether the response had a 'next' header, and request that data as well. This allows the pwclient to list everything instead of being limited to 30 patches. Signed-off-by: Jacob Keller <[email protected]>
- Loading branch information