Skip to content

Add repository exclusion from contribution counts#131

Open
stepanic wants to merge 2 commits into
ashkulz:masterfrom
stepanic:feature/exclude-repos
Open

Add repository exclusion from contribution counts#131
stepanic wants to merge 2 commits into
ashkulz:masterfrom
stepanic:feature/exclude-repos

Conversation

@stepanic

Copy link
Copy Markdown

Summary

Adds the ability to exclude specific repositories from contribution counts used to rank users. Some users own dataset/archive repositories that receive a large volume of automated commits; those commits currently dominate the contribution totals and distort the rankings. This change lets such repositories be excluded so the lists stay representative.

How it works

  • The GraphQL query now also fetches commitContributionsByRepository.
  • Commits made to excluded repositories are subtracted from each user's total/public/private/commit counts (visibility-aware; clamped at zero).
  • Exclusions are configured via a global ExcludedRepos list in presets.go, applied across every preset, plus a repeatable --exclude-repo owner/name CLI flag.
  • ExcludedRepos is folded into PresetChecksum, so changing the list invalidates every preset checksum and triggers regeneration of all region pages by the daily workflow.
  • The YAML output publishes an excluded_repos: block so the website can display the exclusions transparently (companion PR against gh-pages).

Transparency

The excluded list is committed in the repo and surfaced on each region page, so it's clear which repositories are excluded and why. The initial list excludes one dataset/archive repo (domovinatv/dataset.domovina.tv).

Testing

🤖 Generated with Claude Code

Adds the ability to exclude specific repositories (owner/name) from the
commit/contribution totals used to rank users. The GraphQL query now fetches
commitContributionsByRepository, and commits made to excluded repositories are
subtracted from each user's total/public/private/commit counts.

This keeps rankings representative by ignoring dataset/archive repositories whose
automated commit volume would otherwise dominate a user's contribution count.

- github: fetch per-repo commit breakdown and apply exclusions (pure, tested helpers)
- presets: global ExcludedRepos list, folded into PresetChecksum so changing it
  regenerates every region page
- main: add repeatable --exclude-repo flag (adds to the global list)
- output: publish excluded_repos in the YAML so the site can show them transparently
- tests: cover exclusion math, per-repo parsing and edge cases (none existed before)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Stores the commit contributions removed by excluded repositories on each User (ExcludedContributionCount) and emits it as 'excluded:' per user in the YAML output, so the site can show how much each user count was reduced and why they rank where they do.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stepanic added a commit to stepanic/cv that referenced this pull request Jun 25, 2026
… anomaly caveat

Adds a "Croatia ranking" callout to the live-stats section: the captured
committers.top/croatia_public screenshot (28,611 contributions, 2026-06-25
17:14 CET) with a bilingual caveat that the rank is currently inflated by the
domovinatv/dataset.domovina.tv bulk commits, and will be real once upstream
PRs ashkulz/committers.top#131 and #132 are merged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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