I found nothing in the API docs, only the enterprise version mentions that you can retrieve the audit-logs using the staff-tools.
Any idea? I'd love to periodically check the audit log and send the new entries to our IM channel (ChatOps).
Thanks in advance,
As VonC points out, there is no API (as of October 2017).
Unfortunately the "Export" function in the GitHub audit logs produces JSON or CSV of the audit events but the data is missing the payload with the details.
For example the export would show that an issue_comment.update
had been made but the web UI gives a link to the comment itself. The export would show that one user executed org.update_member
on another user but the web UI would show what role change was made for that user.
To get the details of each event, at the moment (October 2017), the only way is via the web UI.
Here is a ruby tool which scrapes the web UI, fetching the audit log entries with details.
Not yet possible through the GitHub API.
But at least, it is possible to export it (since May, 5th 2015) in either JSON or CSV format.
See "Exporting the audit log".
来源:https://stackoverflow.com/questions/28578477/is-it-possible-to-retrieve-the-audit-log-in-github-com-via-the-api