Using the REST API, I want to filter events by their type.
For example, we can see all of a users events with: https://api.github.com/users/gaearon/events 1
but I want to limit it to just of a certain type, like PushEvent. https://api.github.com/users/gaearon/events?type=PushEvent
Anyone have any idea if this is even possible?
The end goal is to count a user's daily number of commit for 30 days.
You could setup a webhook, which is designed to filter events.
You would then only receive to your listener push events, that you can then filter per author.
But that is for future commits.
For past commits already pushed, you would need a GraphQL request, like for instance Commit stats for commits in repository in order to get all commits and filter by author (check also GraphQL changelog for the latest possibilities)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With