Automatically handle pagination

Open
#49 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api

Research direction

Start with the client's requests method and the linked GitHub REST pagination documentation, especially Link headers. Trace how callers currently consume response objects before deciding how pagination should be exposed. Done means paginated responses can be fetched incrementally while callers can choose whether to request another page.

Written by the indexing model from the issue text.

Description

Many Github APIs are paginated, there is documentation on how to handle that here:
https://docs.github.com/en/rest/using-the-rest-api/using-pagination-in-the-rest-api?apiVersion=2022-11-28#using-link-headers

We should handle this implicitly, perhaps turning the requests method into a generator with each iteration returning a new response object. This way callers can decided whether to fetch the next page or not

Dominant language
Python
Stars
3
Forks
8
Avg merge
1d 12h
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozilla-releng/simple-github

All issues in mozilla-releng/simple-github

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.