This repository has been archived by the owner on Nov 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds [Github-like pagination][1] to the `/api/pull_requests` API call. The following rules are applied: - Pages start counting at 1. - A page can be selected via the `page` query argument, the number of entries can be set via the `per_page` query argument. - The ["Link" HTTP-header][2] provide links to appropriate pages to navigate to (`next`, `last`, `first`, `prev`) - Building and queued jobs (collectively called *"pending jobs"* in the following) are always on the first page. - If the number pending jobs is lesser than `per_page`, a subset of the finished jobs is shown. Their number is determined by the difference between `per_page` and the number of pending jobs. - If the number of pending jobs is greater than or equal to `per_page`, finished jobs start on the second page. [1]: https://developer.github.com/v3/#pagination [2]: https://tools.ietf.org/html/rfc8288
- Loading branch information
Showing
1 changed file
with
77 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters