Skip to content

Support pagination when retrieving GitHub installations and repositories - #95

Merged
ieliofficial merged 7 commits into
mainfrom
fix/pagination-github-repo
Aug 13, 2026
Merged

Support pagination when retrieving GitHub installations and repositories#95
ieliofficial merged 7 commits into
mainfrom
fix/pagination-github-repo

Conversation

@DevOlabode

Copy link
Copy Markdown
Member

Closes #88

Walk every page of GitHub list endpoints so callers can reuse one
implementation instead of hard-coding the first 100 items.
listGitHubRepos now walks every page so Connect can show repos past
the first hundred without changing the single-page path for small accounts.
Walk every installation and installation-repo page when probing write
access so repos past the first hundred are not treated as uninstalled.
_findInstallationIdForRepo now walks every installation and selected-repo
page so storage repos beyond the first hundred still resolve to an App token.
Ensure newly created repos are recognized as writable even when the
matching installation or installation-repo sits past the first page.
validateStorage should still report App write access when the target
repo only appears after the first hundred installation repositories.

@ieliofficial ieliofficial left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really clean. Pulling the paging into its own module was the right call, and findInGitHubPages stopping on the first hit means big installations don't get crawled for nothing. Tests cover the 101 item boundary properly.

One thought for later, not blocking: the installation loop is now nested paging, so in theory a user with a lot of installations could burn a lot of requests against the 5000/hr limit. Realistic accounts have a handful so I'm not worried, just noting it.

Same as #94, it's 23 commits behind main, worth rebasing first.

@ieliofficial
ieliofficial merged commit 5793d91 into main Aug 13, 2026
2 checks passed
@ieliofficial
ieliofficial deleted the fix/pagination-github-repo branch August 13, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support pagination when retrieving GitHub installations and repositories

2 participants