fix(github): guard backfill GraphQL helpers' repoFullName parsing - #9345
Closed
philluiz2323 wants to merge 1 commit into
Closed
fix(github): guard backfill GraphQL helpers' repoFullName parsing#9345philluiz2323 wants to merge 1 commit into
philluiz2323 wants to merge 1 commit into
Conversation
fetchLiveCiAggregateViaGraphQl, fetchLivePullRequestReviewDecision, and fetchLiveReviewThreadBlockers parsed repoFullName with a bare split/truthiness check, so extra segments and whitespace-padded slugs reached GraphQL queries. Add a local parseBackfillRepoFullName helper mirroring JSONbored#8311's segment-count and whitespace guard, preserving each call site's fail-soft return contract. Closes JSONbored#9317
❌ 3 Tests Failed:
View the top 2 failed test(s) by shortest run time
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
Contributor
|
Important 🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪 🔍 LoopOver is reviewing…AI analysis is in progress. This comment will update when the review is complete. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟪 Reviewing |
Contributor
Author
|
Closing: opened while #9285 (green CI, fixes the salvageability + selfhost-pg-retention failures currently red on every open PR) is still merge-pending. Will re-file on a green main after that lands. |
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
fetchLiveCiAggregateViaGraphQl,fetchLivePullRequestReviewDecision, andfetchLiveReviewThreadBlockersinsrc/github/backfill.tsparsedrepoFullNamewith a baresplit(/)+ truthiness check. Extra path segments (owner/repo/extra) and whitespace-padded slugs (owner/ repo,owner/repo) therefore reached GraphQL query strings — the same failure mode#8311closed forapp.ts/comments.ts.Adds a local
parseBackfillRepoFullNamehelper mirroring the segment-count + whitespace guard used inlabels.ts/assignees.ts/pr-actions.ts, reused by all three call sites. Each function keeps its existing fail-soft return contract (null/undefined/[]).Test plan
test/unit/graphql-status-rollup.test.ts:fetchLiveCiAggregateViaGraphQlrejects extra-segment and whitespace-padded slugs before any GraphQL calltest/unit/backfill-2.test.ts:fetchLivePullRequestReviewDecisionreturnsundefinedfor the same malformed shapestest/unit/backfill-2.test.ts:fetchLiveReviewThreadBlockersreturns[]for the same malformed shapesCloses #9317