Github Enterprise API - 确定用户是否处于休眠状态?
Github Enterprise API - determine if a user is dormant?
运行 Github 企业版 2.18。有什么方法可以通过 API 确定用户处于休眠状态吗?我在任何地方都没有看到具体的要求...
回答你的问题....
Running Github Enterprise 2.18. Is there any way to determine via the
API that a user is dormant?
不,不可能使用 GitHub API(企业与否)。
GitHub 有一个 strict privacy agreement 的用户。由于存储库可以
是 public 以及私人的,你运气不好通过他们的 API.
获取休眠信息
GitHub 的 own help page 在他们的 "Reports" 部分提到了它:
If you need to get information on the users, organizations, and
repositories in your GitHub Enterprise Server instance, you would
ordinarily fetch JSON data through the GitHub API. Unfortunately, the
API may not provide all of the data that you want and it requires a
bit of technical expertise to use. The site admin dashboard offers a
Reports section as an alternative, making it easy for you to download
CSV reports with most of the information that you are likely to need
for users, organizations, and repositories.
Specifically, you can download CSV reports that list
- all users
- all users who have been active within the last month
- all users who have been inactive for one month or more
- all users whohave been suspended
- all organizations
- all repositories
帮助页面还展示了有关如何通过 CURL 调用报告数据的示例(您也可以使用其他方法来执行此操作,例如我更喜欢在 Powershell 中)
curl -L -u username:password/token http(s)://hostname/stafftools/reports/dormant_users.csv
您可以在没有 API 的情况下使用该数据并将其解析到您的应用程序中。世界尽在掌握。
运行 Github 企业版 2.18。有什么方法可以通过 API 确定用户处于休眠状态吗?我在任何地方都没有看到具体的要求...
回答你的问题....
Running Github Enterprise 2.18. Is there any way to determine via the API that a user is dormant?
不,不可能使用 GitHub API(企业与否)。
GitHub 有一个 strict privacy agreement 的用户。由于存储库可以 是 public 以及私人的,你运气不好通过他们的 API.
获取休眠信息GitHub 的 own help page 在他们的 "Reports" 部分提到了它:
If you need to get information on the users, organizations, and repositories in your GitHub Enterprise Server instance, you would ordinarily fetch JSON data through the GitHub API. Unfortunately, the API may not provide all of the data that you want and it requires a bit of technical expertise to use. The site admin dashboard offers a Reports section as an alternative, making it easy for you to download CSV reports with most of the information that you are likely to need for users, organizations, and repositories.
Specifically, you can download CSV reports that list
- all users
- all users who have been active within the last month
- all users who have been inactive for one month or more
- all users whohave been suspended
- all organizations
- all repositories
帮助页面还展示了有关如何通过 CURL 调用报告数据的示例(您也可以使用其他方法来执行此操作,例如我更喜欢在 Powershell 中)
curl -L -u username:password/token http(s)://hostname/stafftools/reports/dormant_users.csv
您可以在没有 API 的情况下使用该数据并将其解析到您的应用程序中。世界尽在掌握。