[🙏] - Split Contributions into Smaller Category
Describe the request
in GH, contributions are counted from a lot of activity including commits, code reviews, PRs, and issue creations.
Split contributions into these minimum 4 activities for better understanding, and don't remove the contributions data because it's like the sum of those activities.
1. GitHub Commits
- Endpoint:
GET /repos/{owner}/{repo}/commits - Add query parameters like
author={username}to filter commits by a specific user. - Loop through repositories to get all commits by the user.
2. Code Reviews
- Endpoint:
GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews - Filter reviews by
userand loop through pull requests to count reviews.
3. Pull Requests
- Endpoint:
GET /search/issues - Use a search query like
type:pr author:{username}. - Example:
https://api.github.com/search/issues?q=type:pr+author:username.
4. Issues
- Endpoint:
GET /search/issues - Use a search query like
type:issue author:{username}. - Example:
https://api.github.com/search/issues?q=type:issue+author:username.
Notes:
- We'll need to loop through all repositories for detailed statistics.
- The GitHub API has rate limits (e.g., 5,000 requests per hour for authenticated users).
- Aggregating data for multiple repositories or organization-wide metrics may require GraphQL for efficiency.
After thinking about it, it would be a huge changes, maybe we should split it into several more issues so it can become a "good first issue"
The data coming from this repo: https://github.com/depapp/most-active-github-users-counter
Since the code is written in Go, I don't think we have capability to perform any changes for now