fix(signals): group contributor open PRs by repo case-insensitively - #1527
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1527 +/- ##
=======================================
Coverage 95.53% 95.54%
=======================================
Files 204 204
Lines 22084 22086 +2
Branches 7972 7972
=======================================
+ Hits 21097 21101 +4
Misses 412 412
+ Partials 575 573 -2
🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review — safe to merge
✅ Approved — safe to merge Review summary
Nits — 5 non-blocking
Review context
Contributor next steps
Signal definitions
Review detailsGenerated from public PR metadata and the diff. Advisory only; deterministic signals remain authoritative. The `groupByRepo` case-fold (`pr.repoFullName.toLowerCase()`) is exactly the right fix: it collapses case-variant entries for one repo into a single bucket, matching every other case-insensitive repo-name operation in `buildContributorOpenPrMonitor`. The consumer loop recovers original casing from `repoOpen[0]!.repoFullName`, mirroring the key-by-lower/keep-original pattern from `contributor-evidence-graph.ts`. The new integration test drives the real `buildContributorOpenPrMonitor` path through mocked repositories and correctly asserts both grouping and query-casing behaviour. No blockers. Nits (5)
🟩 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.
|
Summary
Fixes #1526.
groupByRepoinbuildContributorOpenPrMonitorbucketed a contributor's open PRs by the rawpr.repoFullName, while every other repo-name operation in the same function is case-insensitive (the registered-repo set, the open-PR filter, the repo lookup). GitHub repo names are case-insensitive, so case-variantrepoFullNamevalues for one repo split into separate groups — under-counting per-repo open PRs, running duplicate detection only within each partial group, and queryinglistPullRequestsonce per casing.What changed
groupByReponow keys buckets onpr.repoFullName.toLowerCase(), matching the function's own repo-name handling.repoFullNamefrom a bucket's first PR (its original casing) for the case-sensitive per-repo DB queries — the established key-by-lower / keep-original pattern used incontributor-evidence-graph.ts.Scope
CONTRIBUTING.md; nosite//CNAME/VitePress.Validation
git diff --checknpm run typechecknpm run test:coveragelocally (4619 passed); the new grouping lines are covered by a case-variant test, and the existing same-casing tests are unchanged.npm run test:workersnpm audit --audit-level=moderateIf any required check was skipped, explain why:
Safety
Notes
src/signals/contributor-open-pr-monitor.ts; mirrors the case-insensitive repo handling already present in the same function and incontributor-evidence-graph.ts.