{{ message }}
Repository navigation
Fix Open PR board GraphQL 502 refresh - #5201
Open
aaronpowell wants to merge 1 commit into
Open
aaronpowell wants to merge 1 commit into
aaronpowell wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
Contributor
|
🟡 Contributor Reputation Check: MEDIUM risk
Maintainers: please review this contributor before merging. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Refreshes can misrepresent unavailable metadata and discard saved state for still-open PRs.
2 open issues
What changed in this PR
Improves Open PR board refresh reliability on large repositories by moving bulk PR discovery off GraphQL.
Changes:
- Uses paginated REST listing with bounded, failure-tolerant per-PR enrichment.
- Updates regression coverage and fetch-strategy documentation.
| File | Description |
|---|---|
| eng/open-pr-board.test.mjs | Covers REST pagination, metadata mapping, and enrichment failures. |
| .github/extensions/open-pr-board/README.md | Documents the revised fetch strategy. |
| .github/extensions/open-pr-board/lib/github.mjs | Replaces bulk GraphQL listing with REST and expands enrichment. |
Review effort: Max
| const out = await runner(["pr", "list", "-R", repo, "--state", "open", "--limit", "200", "--json", LIST_FIELDS]); | ||
| const pullRequests = JSON.parse(out); | ||
| await mapWithConcurrency(pullRequests, CHECK_FETCH_CONCURRENCY, async (pr) => { | ||
| const out = await runner(["api", "--paginate", "--slurp", `repos/${repo}/pulls?state=open&per_page=100`]); |
This branch was successfully deployed
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.


Summary
This PR fixes the Open PR board refresh path that was hitting GitHub's GraphQL endpoint too aggressively when listing open PRs. The board now uses paginated REST for the bulk PR list and keeps per-PR enrichment bounded, so a large repository no longer fails with a GraphQL 502 during reload.
What changed
.github/extensions/open-pr-board/lib/github.mjsfromgh pr listto paginated REST (gh api repos/{repo}/pulls?state=open&per_page=100).eng/open-pr-board.test.mjsto cover the new REST-based listing path and preserve the existing check behavior..github/extensions/open-pr-board/README.mdto document the new fetch strategy.Validation
node --test eng/open-pr-board.test.mjsThis passed successfully (23 tests, 0 failures).