What is the best way to get all commits for many users/organizations using the GitHub API?

耗尽温柔 提交于 2019-12-22 00:13:36

问题


I am trying to get the commit activity for all the repositories from a user or organization using the GitHub API.

Currently the way I am solving the issue is:

  1. List all the repos for a giving user (https://developer.github.com/v3/repos/#list-user-repositories)
  2. For each repo, get the commit activity by calling the commit activity (https://developer.github.com/v3/repos/statistics/#get-the-last-year-of-commit-activity-data)

The problem I run into is that using this method, I quickly run to the request limit set by GitHub (5000 requests per hour) since I have 1000+ users or organizations to look up.

So I am wondering if there's any other way to do this other than using 5000/hr and moving on to the next batch after 1 hour.

来源:https://stackoverflow.com/questions/47106119/what-is-the-best-way-to-get-all-commits-for-many-users-organizations-using-the-g

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!