Skip to content

fix: fetch all pages when checking fork branches - #53

Open
Faaizz wants to merge 1 commit into
jehiah:masterfrom
Faaizz:fix-single-page-branch-fetch
Open

fix: fetch all pages when checking fork branches#53
Faaizz wants to merge 1 commit into
jehiah:masterfrom
Faaizz:fix-single-page-branch-fetch

Conversation

@Faaizz

@Faaizz Faaizz commented Sep 7, 2026

Copy link
Copy Markdown

The branch existence check inspects only the first page of results from the GitHub branches API, so a fork with more than 100 branches could report the freshly pushed branch as missing and abort before the pull request is opened.

This change extends the lookup into other pages.

The branch existence check inspected only the first page of results from
the GitHub branches API, so a fork with more than 100 branches could
report the freshly pushed branch as missing and abort before the pull
request was opened.

Extract the lookup into ForkBranches and follow Response.NextPage until
GitHub stops advertising a next page. The branches endpoint uses
page-number pagination, so NextPage is the correct cursor to follow.
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.

1 participant