Skip to content

Merge renamed contributor accounts into one canonical username - #344

Open
abdalraof-albarbar wants to merge 3 commits into
tscircuit:mainfrom
abdalraof-albarbar:merge-renamed-contributor-usernames
Open

Merge renamed contributor accounts into one canonical username#344
abdalraof-albarbar wants to merge 3 commits into
tscircuit:mainfrom
abdalraof-albarbar:merge-renamed-contributor-usernames

Conversation

@abdalraof-albarbar

Copy link
Copy Markdown

When someone renames their GitHub account the tracker splits them in two — old PRs, weekly overviews and cached analyses keep the old login while new data uses the new one, so you end up with two overview cards, two "PRs by contributor" groups, and split sponsorship totals for one person.

This adds a small contributor-aliases map + getCanonicalUsername() and applies it wherever contributors are aggregated: overview generation and cached PR analyses (so regenerated markdown/README and the stored pr-analysis JSON heal to the canonical login), the frontend tables/graph, and the monthly sponsorship CSV. Merge helpers are factored into lib/merge-contributor-stats.ts with unit tests. Future renames are just one line in contributor-aliases.

@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

@abdalraof-albarbar is attempting to deploy a commit to the tscircuit Team on Vercel.

A member of the Team first needs to authorize it.

pr-analysis/2026-07-07.json really contains PRs cached under both a contributor's
old login (technologyet31-create) and their new one (abdalraof-albarbar) after a
GitHub rename, so the tracker counts one person as two. loadPrAnalysis returns
them under two logins; the test asserts they should load under one. It's marked
test.failing so CI stays green until the fix lands.

Co-authored-by: abdalrouf-AAA <236259618+technologyet31-create@users.noreply.github.com>
When someone renames their GitHub account, old PRs, weekly overviews and
cached analyses keep the old login while new data uses the new one, so the
tracker counts them as two contributors: split overview cards, split PRs by
contributor, and split sponsorship totals.

Add a small contributor-aliases map and getCanonicalUsername(), and apply it
everywhere contributors are aggregated - overview generation, cached PR
analyses (so regenerated markdown/README and the stored JSON heal to the
canonical login), the frontend tables/graph, and the monthly sponsorship CSV -
so a rename no longer splits someone in two. Future renames just need one line
in contributor-aliases.

Co-authored-by: abdalrouf-AAA <236259618+technologyet31-create@users.noreply.github.com>
The fix canonicalizes cached logins on load, so the repro from the previous
commit now passes - drop test.failing and the temporary bun-types shim.

Co-authored-by: abdalrouf-AAA <236259618+technologyet31-create@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant