Github API (v3) 'list events for a repository' call only returns events for the last month ... #21952
-
Hi, I’m trying to retrieve all events (comments, state/label changes) etc. from a repository. I’m using the ‘list events for a repository call’ (https://developer.github.com/v3/issues/events/#list-events-for-a-repository). . ) I was surprised to see only a relatively low number of items returned. Upon closer expection, I notices that the first event returned is the most recent, and the last event returned is exactly one month old. My repository goes back several years, so clearly there is a cut-off here. My problem is that I cannot see that this is documented, nor any parameter that could control it (allowing me to get everything). What is going on? Regards, Jens |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Note, that I did try as well the get events call for a specific issue (https://developer.github.com/v3/issues/events/#list-events-for-an-issue) . In this case, I do get all events, even going back several years. However, I would like to avoid doing a double loop (issues, then events) for get all repo events. |
Beta Was this translation helpful? Give feedback.
-
My mistake! I did the wrong call to get events. I used URL: …<owner>/<repo>/events instead of <owner>/<repo>/issues/events Works fine. (I got 22000+ events :slight_smile: |
Beta Was this translation helpful? Give feedback.
-
Hi @hub-jens, So glad you were able to find the answer; thank you for coming back and updating this thread so that others might learn from your experience in the future! I wanted to let you now that this post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our Community organized so users can more easily find information. As you’ll notice, your Topic is now in the How to use Git and GitHub board. No action is needed on your part. Let me know if you have any questions. Cheers! |
Beta Was this translation helpful? Give feedback.
My mistake!
I did the wrong call to get events.
I used URL: …<owner>/<repo>/events
instead of
<owner>/<repo>/issues/events
Works fine.
(I got 22000+ events :slight_smile: