Open-source contributions: collect merged PRs into 1,000★ repos (nightly)
Maintainers usually reply within 1 day
Assessment
This issue has not been assessed yet.
Description
Summary
We want public profiles to show where a member has had pull requests merged ("Merged into PyTorch, TensorFlow..."). This issue is the data side only; the profile section and the README badge are separate issues that build on it.
What counts as an open-source contribution
- A merged pull request (not just opened) into a public repository the user does not own.
- The repository has at least 1,000 stars at sync time. This is meant to be something to brag about, so small or personal repos don't count.
- PRs the author merged themselves (
merged_byis the author) don't count. - Grouped by the repository owner (an organisation like
pytorch, or a person). The logo is the owner's GitHub avatar (https://avatars.githubusercontent.com/<owner>), so no logo files are hosted. - Members only (people signed up on DevTrack). Guest profiles never show it and never trigger GitHub calls.
Expected outcome
- Table (new idempotent migration in
supabase/migrations/, pluspnpm test:db): one row per user and repository withuser_id,owner,owner_type(Organization/User),repo,stars,merged_prs,first_merged_at,last_merged_at,synced_at. RLS like the other per-user tables (service role writes, public read only through the API). - Sync in the nightly job (
src/app/api/cron/gamification/route.ts→src/lib/gamification/persistence.ts), members only:- GitHub search
type:pr is:merged author:<login> -user:<login>(the same querysrc/lib/goals-sync.tsalready uses for the open-source goal), paginated, capped at 1,000 results. - One batched GraphQL call for the repos found: stars, owner type, archived/fork, and each PR's
mergedByto drop self-merges. - Keep repos with 1,000+ stars, replace the user's rows in one go.
- Budget: about 2-3 GitHub requests per member per night. Use the shared GitHub client and its rate-limit handling; one user failing must not stop the job.
- GitHub search
- Read API:
GET /api/users/[login]/open-sourcereturning the owners (avatar URL, name, type), their repos, merged PR counts and stars, sorted by stars. Cache it like the other public profile data. Returns an empty list for guests and for members who hid the section (see the profile issue).
Acceptance criteria
- Migration is idempotent and covered by
pnpm test:db - Unit tests for the filtering: below 1,000 stars, own repos, self-merged PRs, forks/archived handled; grouping by owner
- Route tests for the API (member, guest, hidden)
- No GitHub calls on a profile view: the data only comes from the table
- Dominant language
- TypeScript
- Stars
- 246
- Forks
- 436
- Avg merge
- 9h 33m
- Merged PRs (30d)
- 213
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Priyanshu-byte-coder/devtrack
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Priyanshu-byte-coder/devtrack#4067 ·
Maintainers usually reply within 1 day
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Priyanshu-byte-coder/devtrack#4066 ·
Maintainers usually reply within 1 day
-
Webhook manager: replace the browser confirm() dialogs with ConfirmModalPossibly taken @Nandaninaulaa claimed this 5 days ago. Opengood first issue level 1 level:beginner status:assigned type:design
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Priyanshu-byte-coder/devtrack#3889 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Goals form: square arcade buttons for recurrence, Create goal and RefreshPossibly taken @KartikeyG-world claimed this 5 days ago. Opengood first issue level 1 level:beginner status:assigned type:design
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Priyanshu-byte-coder/devtrack#3877 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Goals: the error banner and the "No goals yet" hint show at the same timePossibly taken @KartikeyG-world claimed this 5 days ago. Opengood first issue level 1 level:beginner status:assigned type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Priyanshu-byte-coder/devtrack#3872 · 6 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in Priyanshu-byte-coder/devtrack
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
callstackincubator/simlock#2113 ·
Maintainers usually reply within 1 day
-
BUG: Backend Docker build fails due to Go version mismatchPossibly taken @Aakriti0207 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 93/100
gittuf/visualizer#203 ·
Maintainers usually reply within 2 days
-
bug 🐛
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
BaaRai/ARTEX#981 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day