fix(backfill): openIssuesTotal under-counts when open PRs are subtracted from GraphQL issues - #162
Closed
glorysr1209-png wants to merge 6 commits into
Closed
Conversation
JSONbored
requested changes
Jun 1, 2026
JSONbored
left a comment
Owner
There was a problem hiding this comment.
@glorysr1209-png This is still blocked by TypeScript.
A few notes:
- Adding
__typenameand filtering PR-shaped nodes out of the GraphQL issue supplement is the right direction. - The response type was not updated, so
npm run typecheckfails onsrc/github/backfill.ts:Property '__typename' does not exist. - Once the type is fixed, the test coverage should keep the issue-vs-PR distinction pinned.
Required changes:
- Add
__typename?: string | nullto the relevant GraphQL issue-node type. - Keep the supplement path filtering pull requests before upserting issues.
Validation expected:
npm run typechecknpm run test:coverage
This was referenced Jun 2, 2026
JSONbored
self-requested a review
June 3, 2026 22:15
JSONbored
requested changes
Jun 3, 2026
JSONbored
left a comment
Owner
There was a problem hiding this comment.
@glorysr1209-png this is still blocked by typecheck.
A few notes:
- Counting issues without subtracting PR totals is the right problem to solve.
- Current validate fails because
src/github/backfill.tsreads__typenamefrom a type that does not declare it. - The body has some proof, but CI needs to be green before this can move.
Required changes:
- Fix the GraphQL payload typing for
__typename, or avoid reading it from that typed object. - Keep the issues-only total regression test.
Validation expected:
npm run typecheck- Focused backfill tests
- Full validate pipeline
Owner
|
This is now stale/have been awaiting changes for a few days with no response. Please feel free to try again based on current codebase status if interested. |
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
Closes #159. Count open issues via GraphQL
issueTypes: ISSUEinstead of subtracting open PR totals fromrepository.issues, which under-counts repos that have open pull requests.Changes
refreshRepoGithubTotals:issues(states: OPEN, filter: {issueTypes: ISSUE}).supplementOpenIssuesFromGraphQl: same filter + skipPullRequestnodes.openIssuesTotalstays 10.Real Behavior Proof
What I ran
What I observed
openIssuesTotalmatches the issues-only GraphQL total;supplementUnderCountIfNeededcan still run when REST under-counts below the authoritative issue total.