feat(forge): checks pagination & accurate totals#117
Merged
actionshrimp merged 2 commits intomainfrom Feb 24, 2026
Merged
Conversation
…y badges GitHub's GraphQL API caps connection fields at first:100. For repos with 100+ CI checks, the success/total counts in compact badges were wrong. Add totalCount to pr_list and pr_search queries and use it in parse_checks_summary when nodes are truncated. When rollup state is SUCCESS and totalCount > counted nodes, infer all checks passed.
For repos with 100+ CI checks, the pr_detail query now includes pageInfo and totalCount on the contexts connection. When hasNextPage is true, pr.get() recursively fetches remaining pages using a new pr_checks_page query and merges them into the checks_summary via merge_checks_into_summary(). Pagination errors are non-fatal — the PR is returned with whatever checks were fetched.
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
pr_list,pr_search): AddtotalCountto thecontextsconnection so summary badges show accurate totals even when GitHub truncates at 100 nodes. When rollup state isSUCCESS, infer all checks passed without needing every node.pr_detail): AddpageInfo { hasNextPage endCursor }and a newpr_checks_pagequery for cursor-based pagination.pr.get()now recursively fetches remaining pages and merges them viamerge_checks_into_summary(). Pagination errors are non-fatal.Test plan
totalCountinference,parse_checks_page(),merge_checks_into_summary(), paginationpage_inforeturn, and query string validationpr_detail_paginated_checks.json,pr_checks_page.jsonmake lintpasses