Open Merge Requests (MRs) Count Feature for User Profile
Summary
Implement functionality to fetch and display the number of open merge requests authored by a user in the Account Statistics dashboard. This enhances user visibility into their current development workload and activity status.
Problem to Solve
As a GitLab user, I want to see my open merge requests count so that I can track my ongoing contributions and review workload easily.
Intended Users
- Developers
- Contributors
- Project Maintainers
- Team Leads
User Experience Goal
Users should be able to view their open merge request count directly in the Account Statistics panel, without navigating into GitLab manually.
Proposal
- Extend GitLab API client to fetch open merge requests authored by the user.
- Compute total count.
- Display the result in the Account Statistics UI as "Open MRs".
- Handle API failures and permission restrictions gracefully by returning
0orN/A.
Expected Flow:
User Login → Fetch User ID → Fetch Open MRs → Display Count → Show in Dashboard
Further Details
This feature improves:
- Productivity tracking
- Activity awareness
- Project monitoring
Technical considerations:
- GitLab API rate limits
- Token permission validation
- Network error handling
Security or Permissions Considerations
- Requires GitLab API token with
read_apipermission. - Must ensure secure token handling via environment variables.
- No elevated permissions required.
Documentation Impact
- Update README.md to include:
- Required token permissions
- Description of Account Statistics metrics
Testing Considerations
- Unit test for API response handling
- Edge case testing:
- No merge requests
- Invalid token
- API downtime
- UI validation
Milestone & Labels
Milestone: User Profile Dashboard
Labels: feature, backend, gitlab-api, enhancement