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

Support co-authored commits #44

Closed
tarensanders opened this issue Dec 15, 2023 · 5 comments
Closed

Support co-authored commits #44

tarensanders opened this issue Dec 15, 2023 · 5 comments

Comments

@tarensanders
Copy link

Really appreciate this plugin.

Am I right that the plugin does not currently support commits with more than one author? We usually use a squash and merge for PRs, which means that if there are multiple contributors to a PR they get listed as co-authors (we also sometimes co-author commits). But it doesn't seem like the plugin support this - it's only the person who directly authored the commit who seems to be listed.

@Guts
Copy link
Contributor

Guts commented Feb 12, 2024

Interested too in this feature.

@ojacques
Copy link
Owner

Would you have examples of public repos with co-authored commits? Thanks.

@Guts
Copy link
Contributor

Guts commented Feb 24, 2024

You should find some on source of our website https://github.com/geotribu/website.

But it's quite huge so I would recommend you to coauthor a commit on a source file on your own.

Note that you can meet a similar case: a commit authored by one person (attributed to) but committed by another one (the one who registered in the git history). It happens when a suggestion in a PR review is committed through the web UI.

Example: geotribu/website@8657824

@j3soon
Copy link
Contributor

j3soon commented Jul 12, 2024

Git commit authors, committers, and co-authors should all be included for GitHub repos after merging the two PRs above.

If someone's interested in implementing this for GitLab repos:

  • Committers could be included easily by considering the committer_name in the GitLab Commits API.
  • Co-authors may be trickier, and may require manually parsing the commit messages and perform a user lookup as in the current GitLab implementation. I think manual parsing would be good enough, since there's no reliable way to match a GitLab user yet (GitLab: issues matching git authors and Gitlab users #50). Even if there exist a GitLab API that allows easily retrieval of co-authors, the user mismatch issue will still occur. Therefore, using this hypothetical GitLab API does not eliminate the user mismatch issue as using GitHub's GraphQL API.

@ojacques
Copy link
Owner

ojacques commented Oct 3, 2024

Fixed with your PR @j3soon - thanks!

@ojacques ojacques closed this as completed Oct 3, 2024
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

4 participants