Summary
The PR Analytics widget is missing a "Lines Changed" stat — a simple but useful productivity signal. This task adds it as a new stat tile.
What needs to be done
- Fetch
additions and deletions from GitHub GraphQL API for merged PRs
- Extend
/api/metrics/prs response to include totalAdditions and totalDeletions
- Add a new stat tile in the PR Analytics widget showing:
+1,240 / -380
- Color additions green and deletions red (matching GitHub's diff style)
Files to touch
src/app/api/metrics/prs/ (extend GraphQL query + API response)
- PR Analytics widget component inside
src/components/
Hints
- GitHub GraphQL field:
pullRequest { additions deletions }
- Only sum values for merged PRs within the selected date range
- Use
toLocaleString() to format large numbers nicely
Good for
Someone comfortable with GraphQL and React looking to extend an existing feature.
Summary
The PR Analytics widget is missing a "Lines Changed" stat — a simple but useful productivity signal. This task adds it as a new stat tile.
What needs to be done
additionsanddeletionsfrom GitHub GraphQL API for merged PRs/api/metrics/prsresponse to includetotalAdditionsandtotalDeletions+1,240 / -380Files to touch
src/app/api/metrics/prs/(extend GraphQL query + API response)src/components/Hints
pullRequest { additions deletions }toLocaleString()to format large numbers nicelyGood for
Someone comfortable with GraphQL and React looking to extend an existing feature.