Support pagination when retrieving GitHub installations and repositories - #95
Merged
Conversation
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.
Merged
ieliofficial
approved these changes
Aug 13, 2026
ieliofficial
left a comment
Member
There was a problem hiding this comment.
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.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #88