gpt4 book ai didi

github-enterprise - Github Enterprise API - 确定用户是否处于休眠状态?

转载 作者:行者123 更新时间:2023-12-03 17:12:30 34 4
gpt4 key购买 nike

运行 Github Enterprise 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对于它的用户。由于存储库可以
无论是公开的还是私密的,您都不走运通过他们的 API 获取休眠信息。

GitHub 的 own help page在他们的“报告”部分提到了它:

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-enterprise - Github Enterprise API - 确定用户是否处于休眠状态?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60078639/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com