是否可以通过 API 检索 github.com 中的审计日志? [英] Is it possible to retrieve the audit-log in github.com via the API?

查看:34
本文介绍了是否可以通过 API 检索 github.com 中的审计日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 API 文档中没有发现任何内容,只有企业版提到您可以使用人员工具检索审核日志.

I found nothing in the API docs, only the enterprise version mentions that you can retrieve the audit-logs using the staff-tools.

有什么想法吗?我希望定期检查审核日志并将新条目发送到我们的 IM 频道 (ChatOps).

Any idea? I'd love to periodically check the audit log and send the new entries to our IM channel (ChatOps).

提前致谢,

推荐答案

正如 VonC 指出的那样,没有 API(截至 2017 年 10 月).

As VonC points out, there is no API (as of October 2017).

遗憾的是,GitHub 审核日志中的导出"功能会生成审核事件的 JSON 或 CSV,但数据缺少包含详细信息的有效负载.

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.

例如,导出将显示 issue_comment.update 已生成,但 Web UI 会提供指向评论本身的链接.导出将显示一个用户对另一个用户执行了 org.update_member,但 Web UI 将显示为该用户所做的角色更改.

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.

要获取每个事件的详细信息,目前(2017 年 10 月),唯一的方法是通过网络用户界面.

To get the details of each event, at the moment (October 2017), the only way is via the web UI.

这是一个ruby工具,它可以抓取Web UI,获取审计日志带有详细信息的条目.

Here is a ruby tool which scrapes the web UI, fetching the audit log entries with details.

这篇关于是否可以通过 API 检索 github.com 中的审计日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆