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
dev-cmd/contributions: Stats for all maintainers #14722
dev-cmd/contributions: Stats for all maintainers #14722
Conversation
Review period will end on 2023-02-21 at 13:19:32 UTC. |
We can use the GitHub search API to search commits in a repo for a username, but the search APIs have some quite strict rate limiting I think? There's also the commits REST API, so that's a better solution with better rate limits: https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#list-commits--parameters. Also we don't need to tap all the repos if we get the data from GitHub. 🎉 I will figure all this out this week. |
The GitHub commits API doesn't support querying by trailers ( |
@issyl0 As a potential hack around this it just occurred to me: almost all of those cases are going to be ones where another maintainer was either the author or committer so: you might be able to do a maintainer-wide query and then filter commit messages after the fact. |
Review period ended. |
9d2dcae
to
9abf469
Compare
I updated this so that just the bare |
- With `brew contributions`, this will output a list of stats (across the specified time period, or all time) for people in the "maintainers" team on GitHub. - Add a `--user` flag for getting stats for a specific user (either username, name or email address). - This assumes that their Git committer details are the same as their name is set to on GitHub. - Show an error message if trying to generate a CSV for the full maintainer list, since I haven't worked out how to best show all of that info yet (or even how best to show only the totals across everything for every user) in that format.
9abf469
to
214110f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thanks!
Thanks again @issyl0! |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?brew contributions
. #13642.brew contributions maintainers
, this will output a list of stats (across the specified time period, or all time) for people in the "maintainers" team on GitHub.