Skip to content

fix(topcompanies): compare commits, not PRs, when ranking by contributions - #255

Merged
Progi1984 merged 1 commit into
PrestaShop:masterfrom
PrestaEdit:fix-company-contributions-rank-ties
Sep 30, 2026
Merged

Progi1984 merged 1 commit into
PrestaShop:masterfrom
PrestaEdit:fix-company-contributions-rank-ties

Conversation

@PrestaEdit

@PrestaEdit PrestaEdit commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

In traces:generate:topcompanies, the contributions ranking loop stores $lastScore = $company->contributions, but compares it with $company->mergedPullRequests. The two almost never match, so the rank goes up for every company and ties are ignored.

On a local run, 15 companies share their commit count with the previous one but get a different rank. For example, Head Issue, ShopRunners and Web Cooking Factory (6 commits each) are ranked 23, 24 and 25.

Fix

Compare with $company->contributions, as the PR ranking above does with mergedPullRequests.

Verification

  • Re-generated topcompanies.json locally: equal commit counts now always share a rank, and different counts always get different ranks (the 6-commit companies above now all share Exclude more bots #22).
  • phpstan and php-cs-fixer pass.

🤖 Generated with Claude Code

…tions

The contributions ranking compared the previous company's contributions
with the current company's merged PRs, so companies with the same
number of commits got different ranks (e.g. Head Issue, ShopRunners and
Web Cooking Factory, 6 commits each, ranked 23, 24 and 25).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Progi1984
Progi1984 merged commit 74a182c into PrestaShop:master Sep 30, 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: Merged

Development

Successfully merging this pull request may close these issues.

3 participants