Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🙏] - Split Contributions into Smaller Category #89

Open
ImBIOS opened this issue Dec 4, 2024 · 3 comments
Open

[🙏] - Split Contributions into Smaller Category #89

ImBIOS opened this issue Dec 4, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@ImBIOS
Copy link
Contributor

ImBIOS commented Dec 4, 2024

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 user and 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.
@ImBIOS ImBIOS added the enhancement New feature or request label Dec 4, 2024
@ImBIOS
Copy link
Contributor Author

ImBIOS commented Dec 4, 2024

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"

@mazipan
Copy link
Collaborator

mazipan commented Dec 4, 2024

The data coming from this repo: https://github.com/depapp/most-active-github-users-counter

@mazipan
Copy link
Collaborator

mazipan commented Dec 4, 2024

Since the code is written in Go, I don't think we have capability to perform any changes for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants