GithubAPI: Get repositories a user has ever committed in

一笑奈何 提交于 2019-12-06 10:49:37

问题


Within the scope of the research project ideally I need for any two users find the repositories that they have in their shared history of public development, i.e. they have committed in the same repos.

I wonder if it is possible to get the list of repositories that were ever been touched by a given user.

In Github-API I can see only:

  1. GET /repos/:owner/:repo/contributors
  2. GET /users/:user/repos
  3. GET /users/:user/events

First gives only the contributors for a given :repo repository Second only gives a :user's repos Third was promising, but events are limited to 300

Is there any way to get all the repositories a user has ever worked with on Github without dumping all 3 millions repos?


回答1:


You could try using the github search api: https://developer.github.com/v3/search/#search-code

one catch is that you have to specify a query, so for example if I lookup my name with the query 'def' you would get: https://api.github.com/search/code?q=def+user:manuelvanrijn



来源:https://stackoverflow.com/questions/24006586/githubapi-get-repositories-a-user-has-ever-committed-in

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