Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: include co-authors #1351

Open
scottrigby opened this issue Oct 15, 2022 · 0 comments
Open

Feat: include co-authors #1351

scottrigby opened this issue Oct 15, 2022 · 0 comments

Comments

@scottrigby
Copy link

scottrigby commented Oct 15, 2022

Problem

contrib.rocks is great for improving community visibility! However, co-authors are not currently included.

Addtl info

A common way to attribute a Git commit to multiple authors is to use the Co-authored-by Git commit trailer. For example, see this commit message.

GitHub contributors graph supports this:

Proposed solution

IDK if GitHub API has an acceptable way to do this only using the API.

I know we can get the Co-authored-by commit trailer content –  something like this:

$ {
    git log --pretty="%an <%ae>";
    git log --pretty="%(trailers:key=Co-authored-by,valueonly,only)" | awk NF;
  } | sort | uniq

Person 1 <[email protected]>
Person 2 <[email protected]>
Person 3 <[email protected]>

Once you get the emails, you could search for a GitHub user account matching each with https://docs.github.com/en/rest/search#search-users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant