fix(signals): preserve repo casing for open PR lookups#1716
Conversation
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-06-29 18:33:11 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 6 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1716 +/- ##
==========================================
- Coverage 95.58% 95.56% -0.02%
==========================================
Files 204 204
Lines 22295 22296 +1
Branches 8053 8053
==========================================
- Hits 21310 21307 -3
Misses 408 408
- Partials 577 581 +4
🚀 New features to boost your workflow:
|
Motivation
repoFullNamecasing for all downstream exact-case DB lookups, which caused mixed-case rows to be skipped for reviews/checks/files and under-counted pending scenarios.Description
sameRepoFullNameto select PR rows for signal loading and scenario detection instead of exact===equality insrc/scoring/pending-pr-scenarios.ts.repoFullName(e.g.pr.repoFullName) so exact-case DB accessors resolve the correct rows, and compute per-repo PR lists by filtering the originalpullRequestsset case-insensitively insrc/signals/contributor-open-pr-monitor.ts.sameRepoFullNamehelper and updatedetectPendingPrScenario/loadContributorRepoOpenPrSignalsto use it, and adjustbuildContributorOpenPrMonitorto calllistPullRequestFileswith each PR's stored casing.test/unit/contributor-open-pr-monitor.test.tsthat simulates mixed-case PR rows and asserts both PRs retain reviews/files and are included in pending scenario counts.Testing
npx vitest run test/unit/contributor-open-pr-monitor.test.ts test/unit/pending-pr-scenarios.test.tsand all tests passed (29 tests across 2 files).npm run typecheckand it succeeded.npm run test:coveragefailed due to the coverage provider errorTypeError: jsTokens is not a function, so full coverage collection could not complete locally.npm run test:ciandnpm audit --audit-level=moderatewere blocked by external/tooling issues (actionlint setup fallback complaining about a custom runner label and the npm audit endpoint returning403), so the complete gated CI could not be run in this environment.Codex Task