Repository navigation
Conversation
Contributor
Author
|
The only failure was |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Concurrent cache misses can duplicate GitHub requests and bypass the intended shared outage backoff.
1 open issue
What changed in this PR
Adds an upstream achievement recognizing contributors to /dev/null within the existing profile badge system.
Changes:
- Fetches GitHub contributor IDs with hourly caching and outage fallback.
- Adds badge eligibility and icons to both achievement views.
- Documents the badge and tests contributor matching, caching, and unlocking.
| File | Description |
|---|---|
| tests/Unit/Queries/UserAchievementsQueryTest.php | Tests badge unlocking and updated count. |
| tests/Unit/Queries/UpstreamContributorsQueryTest.php | Tests contributor lookup, pagination, and caching. |
| resources/js/components/achievements-shelf.tsx | Adds the upstream icon. |
| resources/js/components/achievements-dialog.tsx | Adds the upstream icon. |
| KNOWLEDGE_BASE.md | Documents eligibility and updates badge count. |
| app/Queries/UserAchievementsQuery.php | Integrates contributor-based eligibility. |
| app/Queries/UpstreamContributorsQuery.php | Fetches and caches contributor IDs. |
| app/Enums/Achievement.php | Defines upstream badge metadata. |
Review effort: Balanced
5 tasks
added 2 commits
October 23, 2026 14:44
…-badge # Conflicts: # KNOWLEDGE_BASE.md # app/Enums/Achievement.php # app/Queries/UserAchievementsQuery.php # resources/js/components/achievements-dialog.tsx # resources/js/components/achievements-shelf.tsx # tests/Unit/Queries/UserAchievementsQueryTest.php
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.

Relates to #442. /dev/null is built in the open by its own users, but nothing on a profile says so. This adds a 14th badge, upstream: "Got a pull request merged into /dev/null itself."
UpstreamContributorsQueryasks GitHub for the repository's contributors (anyone with a commit on production, which is where every merged pull request lands) through the existingGitHub::accountIds(), up to 10 pages. People are matched by GitHub account ID, so a renamed username keeps the badge.git-pull-requesticon in the shelf and the dialog.It doesn't overlap with #488: that PR builds the /about list in its own
ContributorsQuery; this one only needs the IDs. If #488 lands first, the two could share one GitHub call.Tests:
tests/Unit/Queries/UpstreamContributorsQueryTest.php(matching by ID, pagination, the hour of cache, the fallback while GitHub is down, and no badge when it has never answered) and an unlock case inUserAchievementsQueryTest. The full suite passes with 100% coverage and type coverage.The badge unlocked on a profile:
