Skip to content

feat(topcompanies): emit merged PRs per repository for each company - #254

Merged
Progi1984 merged 1 commit into
PrestaShop:masterfrom
PrestaEdit:feat/company-repositories
Sep 29, 2026
Merged

Progi1984 merged 1 commit into
PrestaShop:masterfrom
PrestaEdit:feat/company-repositories

Conversation

@PrestaEdit

Copy link
Copy Markdown
Contributor

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

  • Company DTO: new repositories ({repo: count}) and repositories_by_year ({repo: {year: count}}), exported in topcompanies.json / topcompanies_prs.json.
  • traces:generate:topcompanies: bumps them in the attribution loop, next to merged_pull_requests_by_year. Same attribution (sponsor company, else employee time frame), so the per-repo totals always add up to merged_pull_requests.

The change only adds fields, so older front versions ignore them.

Verification

  • traces:generate:topcompanies run on a local gh_pullrequests.json: for all 69 companies, the sum of repositories equals merged_pull_requests, and each repo's repositories_by_year sums to its total.
  • phpstan and php-cs-fixer pass.

Front counterpart: PrestaShop/TopContributors (linked below). Needs a Traces release before the front CI picks it up.

🤖 Generated with Claude Code

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
Progi1984 merged commit 42f4da8 into PrestaShop:master Sep 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

3 participants