Skip to content

feat: add a contributor achievement badge - #800

Open
arhen wants to merge 3 commits into
dev-null-sh:productionfrom
arhen:feat/contributor-badges
Open

arhen wants to merge 3 commits into
dev-null-sh:productionfrom
arhen:feat/contributor-badges

Conversation

@arhen

@arhen arhen commented Oct 20, 2026 •

Copy link
Copy Markdown

Summary

Recognize developers who contribute to /dev/null with one contributor achievement badge.

Addresses @paulinevos's review feedback: replaces the four proposed tiers with one badge and uses wording that covers features, bug fixes, documentation, and other merged changes.

Related to #894 and #442. This covers GitHub-credited commits, including merged pull requests. Issue-only activity, reviews, and unmerged pull requests are not counted, so it does not fully implement the broader proposal in #894.

Changes

  • Add one contributor badge, unlocked at the first GitHub-credited contribution, with no bonus XP.
  • Match accounts by immutable GitHub ID, not username.
  • Sync contributor counts hourly in a unique queued job. Profile views read cached counts and never request GitHub.
  • Read the configured source repository, paginate up to 1,000 contributors, filter bots/anonymous authors, and preserve the last successful cache for up to one day when GitHub fails.
  • Merge current production and resolve the knowledge-base/test conflicts while preserving the shell-shocked and super-saiyan badges and existing achievement UI.
  • Update the knowledge base and regression tests for the single badge, configured repository, cache failures, pagination, and account matching.

Validation

Local checks on 98dfac9f9519692f60e2445da252a74fd5d491e0:

  • composer test:lint — passed; existing warnings in unrelated files remain.
  • composer test:type-coverage — passed, 100%.
  • composer test:types — passed (PHPStan and TypeScript).
  • bun run test:unit — passed.
  • bun run build — passed.
  • php vendor/bin/pest --ci tests/Unit/Queries/UserAchievementsQueryTest.php tests/Unit/Jobs/SyncUpstreamContributionsTest.php — 44 passed, 301 assertions.
  • Full PHP CI coverage run — 4,264 passed, 23,881 assertions, 100.0% coverage. Command, with the local PCOV extension explicitly enabled for parent and worker processes:
    php -d extension=/private/tmp/pcov-build/pcov-1.0.12/modules/pcov.so -d memory_limit=-1 vendor/bin/pest --parallel --ci --coverage --exactly=100.0 --passthru-php="'-d' 'memory_limit=-1' '-d' 'extension=/private/tmp/pcov-build/pcov-1.0.12/modules/pcov.so'"
  • git diff --check — passed.

No controls, styles, motion, or mobile interactions were changed; the badge uses the existing data-driven achievement components. Browser visual and physical-device checks were not run.

Independent review

Read-only review by a separate GPT-6.1 Sol reviewer: Code PASS, no blocking findings across the complete 10-file diff.

  • Base: 3a9a137426176a3a93d7fb2afcdee7e269a5ff4c
  • Head: 98dfac9f9519692f60e2445da252a74fd5d491e0
  • Independent whitespace/diff check passed. The isolated review worktree had no vendor dependencies, so the reviewer inspected the code/tests and relied on the exact-tree test results above rather than rerunning Pest.
  • Visual review: N/A for import/icon-map-only frontend changes using unchanged existing components. No browser, device, or layout-shift verification is claimed.

Limitations

  • Local PHP is 8.5.11, below the lockfile security advisory's 8.5.12 patch floor. A normal composer install was blocked; locked dependencies were installed for local verification with --ignore-platform-req=php. No lockfile, security advisory, or global PHP configuration was changed.
  • Contributor eligibility follows GitHub's cached contributors list, not all forms of repository participation; only the first 1,000 listed contributors are synchronized.
  • Hosted CI results are separate from the local validation above.

Adds patch (1), upstream (5), sudoers (25), and mknod (100) badges for
developers who got patches merged into nunomaduro/dev-null.sh. An hourly
job reads GitHub's contributor list and keeps it in the cache for a day;
profiles only read that cache. No XP.
Comment thread app/Enums/Achievement.php Outdated
@farischt

Copy link
Copy Markdown

The issue proposal says we should also count issues/commits/pull requests.
#894

@hbenabdallah

Copy link
Copy Markdown
Contributor

Overlaps with #741, which also adds a contributor badge (#894).

@arhen arhen changed the title feat: add tiered badges for contributions to /dev/null itself feat: add a contributor achievement badge Oct 24, 2026
@arhen

arhen commented Oct 24, 2026

Copy link
Copy Markdown
Author

@nunomaduro @paulinevos Feedback addressed ya.

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.

4 participants