devtrack icon indicating copy to clipboard operation
devtrack copied to clipboard

[FEAT] Add PR review participation rate metric

Open Priyanshu-byte-coder opened this issue 6 months ago • 9 comments

Summary

Track how often the user reviews other people's PRs (not just their own), showing their code review participation rate as a percentage.

Motivation

Being a good reviewer is as important as writing code. Review participation is a missing metric in DevTrack.

Acceptance Criteria

  • [ ] New stat in PRMetrics: "Reviews given" — PRs the user reviewed (not authored)
  • [ ] Data from GitHub search: reviewed-by:{username} is:pr
  • [ ] Show: review count this period + ratio of reviews-given to PRs-authored
  • [ ] Tooltip: "PRs where you left a review comment or approval"
  • [ ] Respects 30 / 90 / 365 day range
  • [ ] Displayed alongside existing PR stats
  • [ ] No new dependency — uses existing GitHub search API

Files to Touch

  • src/app/api/metrics/prs/route.ts
  • src/components/PRMetrics.tsx

Priyanshu-byte-coder avatar May 16 '26 19:05 Priyanshu-byte-coder

hiii @Priyanshu-byte-coder i would like to work on this issue please assign it to me under GSSoC'26.

seffhunnn avatar May 16 '26 19:05 seffhunnn

@seffhunnn Please see the note left on #90 — mass-requesting assignment across multiple issues at once won't result in any assignments. Pick one issue, share your approach, and we'll go from there.

Priyanshu-byte-coder avatar May 16 '26 20:05 Priyanshu-byte-coder

Hi @Priyanshu-byte-coder, I am a GSSoC '26 contributor and I would love to take on this issue! I have strong experience with Next.js, TypeScript, and the GitHub API.

Here is my planned approach to meet all the acceptance criteria:

Backend Integration (src/app/api/metrics/prs/route.ts): I will utilize the existing GitHub search API configuration to trigger a query with reviewed-by:{username} is:pr alongside the existing query constraints. I will calculate both the total review count and the ratio of reviews-given to PRs-authored, ensuring it dynamically respects the selected 30/90/365-day range filters.

Frontend UI Display (src/components/PRMetrics.tsx): I will add a new clean statistic layout for "Reviews given" alongside the existing PR metrics. I'll implement a custom Tailwind-styled hover tooltip stating: "PRs where you left a review comment or approval".

No new dependencies will be added. Please assign this to me, and I will submit a clean, well-typed PR for review!

zishanq7861 avatar May 17 '26 05:05 zishanq7861

Hey @Priyanshu-byte-coder, I have implemented the feature and fixed all the bugs you mentioned. Ready for your review whenever you have time!

zishanq7861 avatar May 19 '26 08:05 zishanq7861

Hi @Priyanshu-byte-coder! I'd like to work on this issue under GSSoC'26. could you please assign this issue to me.

bhavyanjain3004 avatar Jul 01 '26 17:07 bhavyanjain3004

@bhavyanjain3004 This issue is already taken by @zishanq7861. Check other open issues!

github-actions[bot] avatar Jul 01 '26 17:07 github-actions[bot]

Hey @zishanq7861 — this issue was assigned a while back with no recent activity. Unassigning so it's available for Hacktoberfest contributors. Still working on it? Comment and we'll reassign you.

Priyanshu-byte-coder avatar Oct 14 '26 18:10 Priyanshu-byte-coder

Assigned to @Priyanshu-byte-coder! You have 7 days to open a PR. No PR after 7 days = auto-unassigned so others can pick it up. Good luck!

github-actions[bot] avatar Oct 14 '26 18:10 github-actions[bot]

✅ Closed as completed!

If DevTrack has been useful, a ⭐ star on the repo helps the project grow and reach more developers.

github-actions[bot] avatar Nov 16 '26 06:11 github-actions[bot]