I'm working on a site, need to crawl all user information (at least the user on our site) from GitHub. I searched GitHub API, and found no answer.
So is there any way I can do this job? I only have the users emails. (I can check user by compare the email hash with gravatar URL)
The answer is "/users/:user/repo", but I have all the code that does this in an open-source project that you can use to stand up a web-application on a server.
The Users API allows to get public and private information about the authenticated user. Users. Get the authenticated user. Update the authenticated user. List users.
As described here you may rely on those two following APIs to retrieve a JSON formatted output. As requested, both of them provide the gravatar URL.
Collaborators (members of the organization on the project)
Contributors (authors of, at least, one commit)
UPDATE:
The previous API methods requires that you start from a known repository. The two following proposals try to work around this constraint. They rely on the previous version of the API (v2)
Query by email (in your question, you state "I only have the users emails.". Provided the users agreed to publish them you should be able to retreive some information about the user using the email as a query parameter)
Search for repositories (given some keywords (language, stack, ...) retrieve a list of repositories. Then, for each one, using the two first proposals, list their collaborators and/or contributors)
Note: Make sure that intended usage of the API is in concordance with GitHub Terms of service
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With