3

I wanted to confirm that the GitHub API for events provides only the latest 300 events only or is can I get the entire list of events?

Gras Double
  • 15,901
  • 8
  • 56
  • 54
rohitsakala
  • 379
  • 3
  • 15
  • Also, can someone please tell me how to retrieve list of CreateEvents in a repo ? – rohitsakala Mar 31 '16 at 13:06
  • Also, after analyzing that I can get only commits only a year back. Is there any way to get all the commits from the start of a repository – rohitsakala Mar 31 '16 at 19:14
  • The documentation states it is limited to last 300 events and last 90 days, which I confirm is the case. It would be very helpful to me if there was a way to circumvent this limitation. Notice that on a GitHub user profile, at the "Contribution activity" section, you can explore up to the beginning. So maybe there is some hacky way to find back all events. – Gras Double Apr 11 '17 at 15:44

2 Answers2

1

A bit of searching led me to this answer on another question: How do I get a list of all the GitHub projects I've contributed to in the last year?

The application is hosted at opensourcecontributo.rs. Simply input your GitHub username, then you will have two tabs to use, allowing you to list all the repositories you contributed to, and all your events. The source code is available on GitHub at tenex/opensourcecontributors.

I guess this application does what I suggested in my comment to your question: for recent data it may just use the API, and for older data it may use the timeline to enumerate repositories, then use the API to inspect these repositories. I definitely have to take a look at this code.

Community
  • 1
  • 1
Gras Double
  • 15,901
  • 8
  • 56
  • 54
1

My understanding is that GitHub's API doesn't limit you to 300 events, but instead only events that have occurred in the last 90 days

Only events created within the past 90 days will be included in timelines. > > Events older than 90 days will not be included (even if the total number of > events in the timeline is less than 300).

https://docs.github.com/en/rest/activity/events?apiVersion=2022-11-28#list-public-events-for-a-user

If you are looking for the raw number of events that a user created on any day historically through their account, I created a script that works within GitHub's current HTML display and web scraping instead of using their API (as I can't find a way to acquire this kind of data through their API). As a note, the details of each event although can be displayed in the UI, is activated by private calls so I don't believe there is an easy way to access that data.

proselotis
  • 11
  • 1