fix(ce-resolve-pr-feedback): paginate GraphQL connections#807
Merged
Conversation
On long-lived PRs that accumulated more than one page of review threads,
the skill silently dropped everything past page 1 of each GraphQL
connection and reported "0 of 0 resolved" while real findings sat
unanswered.
The two GraphQL fetch scripts now paginate. `gh api graphql --paginate`
follows only one `pageInfo` per response, so `get-pr-comments` issues
three separate paginated queries (reviewThreads, comments, reviews) and
assembles the result before running the existing filter; the inline
per-thread comment cap is also bumped from 10 to 100 (without
follow-up pagination — threads exceeding that depth are rare and out
of scope here). `get-thread-for-comment` paginates reviewThreads the
same way.
A new tests/resolve-pr-feedback-pagination.test.ts enforces the
contract: each top-level connection is paginated with `after:
$endCursor` and selects `pageInfo { hasNextPage endCursor }`.
Fixes #798.
Merged
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.
On long-lived PRs that accumulated more than one page of review threads,
ce-resolve-pr-feedbacksilently dropped everything past page 1 of each GraphQL connection and reported "0 of 0 resolved" while real findings sat unanswered. The two GraphQL fetch scripts now paginate so the resolver sees every unresolved thread regardless of PR length.gh api graphql --paginatefollows only onepageInfoper response, soget-pr-commentsissues three separate paginated queries (reviewThreads,comments,reviews) and assembles the result before running the existing filter. The inline per-thread comment cap is also bumped from 10 to 100, without follow-up pagination — threads exceeding 100 comments are rare and out of scope here.get-thread-for-commentpaginatesreviewThreadsthe same way.A new
tests/resolve-pr-feedback-pagination.test.tsenforces the contract: each top-level connection is paginated withafter: $endCursorand selectspageInfo { hasNextPage endCursor }.Fixes #798.