feat(topcompanies): emit merged PRs per repository for each company - #254
Merged
Progi1984 merged 1 commit intoSep 29, 2026
Merged
Conversation
Adds `repositories` and `repositories_by_year` to each company in topcompanies*.json, counted from the same PR attribution as `merged_pull_requests` (sponsor company or employee time frame), so per-repository totals always add up to the company's merged PRs. The front uses it to show accurate "Top repositories" / "All repos" sections on company pages instead of summing members' lifetime stats. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Progi1984
approved these changes
Sep 29, 2026
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.
Why
Company pages on contributors.prestashop-project.org summed each member's lifetime stats, so a company was credited with everything its contributors ever did, including work for other companies. Example: Wepika showed 492 merged PRs, but only 3 are attributed to it. 71 of 83 companies were inflated.
The front now uses the company's own counters. To keep the "Top repositories" / "All repos" sections, it needs per-company repository counts, which only Traces can compute.
What
CompanyDTO: newrepositories({repo: count}) andrepositories_by_year({repo: {year: count}}), exported intopcompanies.json/topcompanies_prs.json.traces:generate:topcompanies: bumps them in the attribution loop, next tomerged_pull_requests_by_year. Same attribution (sponsor company, else employee time frame), so the per-repo totals always add up tomerged_pull_requests.The change only adds fields, so older front versions ignore them.
Verification
traces:generate:topcompaniesrun on a localgh_pullrequests.json: for all 69 companies, the sum ofrepositoriesequalsmerged_pull_requests, and each repo'srepositories_by_yearsums to its total.Front counterpart: PrestaShop/TopContributors (linked below). Needs a Traces release before the front CI picks it up.
🤖 Generated with Claude Code