What would be the best way to track Github account activity via their API?

So i after searching through various resources over the internet I have come to a point where I need a third opinion.

The problem statement : I would like to integrate my user’s github account activity inside app. I would mainly like to alert my user when events occur under his github account, such as when a repo is created, deleted or pushed to or when a new user is added to a team or on organization.

So far, I am able to retrieve few of this events from the github developer API.


There are two problems with this.

  1. It doesn’t include some of the events such as when a repository is deleted.
  2. It doesn’t include the event source location/ip address – which is one of the most important thing that i need.

I know that, For enterprise domains github provides “audit-log” functionality which has almost all the information I need to achieve the resolution for my task, However these “audit-logs” are not exposed via the developer API. (Is this correct?)

Related stackoverflow answer

My questions are,

  1. What would be the best approach to get these events with their source location/country (like audit-logs) into my app.

  2. Is there a way to retrieve this audit-logs somehow? Are there any libraries available that may help?


Source: python

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.