OWASP / OWASP/Nest

feat: Add PR count and merged PR stats to member profile page

Open
#4,444 5 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
451
Forks
707
Avg merge
22h 59m
Merged PRs (30d)
91

Description

Community & Support: [LinkedIn Group](https://www.linkedin.com/groups/14656108/) · [Slack #project-nest](https://owasp.slack.com/archives/project-nest)

Active project leaders: Arkadii Yakovets -- [GitHub](https://github.com/arkid15r/) · [LinkedIn](https://www.linkedin.com/in/arkid15r/) · [Slack](https://owasp.slack.com/team/U060W3NKLTF); Kate Golovanova -- [GitHub](https://github.com/kasya/) · [LinkedIn](https://www.linkedin.com/in/kate-golovanova/) · [Slack](https://owasp.slack.com/team/U07PWB1JZ6Z)

[Contributing](https://github.com/owasp/nest/blob/main/CONTRIBUTING.md) · [Code of Conduct](https://github.com/owasp/nest/blob/main/CODE_OF_CONDUCT.md) · [GSoC Mentors](https://github.com/owasp/nest/blob/main/MENTORS.md)

---

**Is your feature request related to a problem? Please describe.**
The member profile page `(/members/[memberKey])` displays a contribution heatmap and total contributions count, but provides no visibility into a member's pull request activity. There is no way to see how many PRs a member has opened, how many were merged, or which repositories they have contributed to via PRs — users have to navigate to GitHub directly to find this information.

**Describe the solution you'd like**
Add pull request stats to the member profile page:
1. A PR count stat card showing total PRs opened and merged PRs alongside the existing followers / repositories / contributions stats
2. A "Top Contributed Repositories" section listing repositories ordered by contribution count — the top_contributed_repositories GraphQL query already exists in UserQuery but is not currently rendered on the profile page

**Backend changes**: expose pull_requests_count and merged_pull_requests_count as aggregated fields on UserNode (Strawberry GraphQL), computed from the existing PullRequest model's author FK.
**Frontend changes**: render the new fields as stat cards in frontend/src/app/members/[memberKey]/page.tsx and wire up the existing top_contributed_repositories query to a visible repository list.

**Describe alternatives you've considered**
Linking directly to the member's GitHub profile for PR stats, but this breaks the unified Nest experience and requires users to leave the site. Computing stats client-side from the already-fetched recent pull requests list, but that only covers the most recent items and would be inaccurate for prolific contributors.

**Are you going to work on implementing this?**
- [x] Yes
- [ ] No

**Additional context**
The RepositoryContributor model and top_contributed_repositories resolver already exist (backend/apps/github/api/internal/queries/user.py) — the backend plumbing is largely in place. The PullRequest model has an author FK to User, so the aggregation is a straightforward annotate(). This keeps the change self-contained with no new models required.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.