Optimize API refresh: separate PR-level and repo-level updates, add check runs to GraphQL batch#226
Draft
Optimize API refresh: separate PR-level and repo-level updates, add check runs to GraphQL batch#226
Conversation
…heck runs to batch Co-authored-by: DonnieBLT <128622481+DonnieBLT@users.noreply.github.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
blt-leaf | 716a88a | Commit Preview URL Branch Preview URL |
Feb 22 2026, 08:46 PM |
Copilot
AI
changed the title
[WIP] Separate refresh methods for PR and repository
Optimize API refresh: separate PR-level and repo-level updates, add check runs to GraphQL batch
Feb 22, 2026
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.
Batch refresh was setting
checks_passed/failed/skippedandbehind_byto0on every refresh due to missing data in the GraphQL query. No efficient path existed to updatebehind_byfor all PRs in a repo when the base branch advanced.Changes
fetch_multiple_prs_batch()— 2-pass GraphQL (was 1 incomplete pass)headCommit: commits(last: 1) { statusCheckRollup { contexts } }— check runs now populated fromstatusCheckRollup(was hardcoded0)headRefOid+baseRefNamefrom pass 1 to build abaseRef.compare(headRef: sha)batch query inline —behind_bynow accurate_incomplete_fieldsmarkerNew repo-level refresh:
POST /api/refresh-repoRefreshes
behind_byfor all tracked PRs in a repo using 2 GraphQL calls total, independent of PR count. Designed for the "base branch just moved" case (e.g. a PR was merged).fetch_repo_open_prs()— paginated GraphQL to get all open PRs withheadRefOid+baseRefNamefetch_repo_comparison_batch()— single GraphQL batch for all comparisonsFrontend
2 × ⌈n/50⌉)/api/refresh-repoper unique repo; displays2 × uniqueRepoCountAPI callsOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.