Yashu Seth
Yashu Seth

Reputation: 985

Get names of contributors of a repository along with username, email, and links to github profile

How can I get a list of names of contributors of a repository in order of the date of their first contribution along with their username, email and links to their github profile. I used

git log --topo-order --reverse --format="%aN <%aE>" | awk ' !x[$0]++'

But this does not give me the names and links to their github profiles.

Upvotes: 1

Views: 848

Answers (1)

Chris
Chris

Reputation: 136967

But this does not give me the names and links to their github profiles.

That's correct.

Git is a standalone open-source project. It is not related to GitHub except that GitHub has based its entire business model around Git. This relationship is similar to the one that Git has with Atlassian (or Bitbucket, if you prefer to think of GitHub as a product rather than a company) or countless other companies.

Git has no support for GitHub's proprietary features, nor does it link to (or even know about) GitHub's user pages.

If you want to get a list of a GitHub repository's contributors your best bet is to use their list contributors API endpoint:

GET /repos/:owner/:repo/contributors

This returns a JSON string that can be inspected for collaborators. You might want to combine this with other API calls, e.g. to list the commits in a repository.

Upvotes: 3

Related Questions