mkdocs-git-committers-plugin-2 icon indicating copy to clipboard operation
mkdocs-git-committers-plugin-2 copied to clipboard

Support co-authored commits

Open tarensanders opened this issue 1 year ago • 4 comments

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.

tarensanders avatar Dec 15 '23 04:12 tarensanders

Interested too in this feature.

Guts avatar Feb 12 '24 10:02 Guts

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

ojacques avatar Feb 24 '24 09:02 ojacques

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: https://github.com/geotribu/website/commit/8657824ad6acdd5052d3f0a37528108e961d6930

Guts avatar Feb 24 '24 10:02 Guts

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 (#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.

j3soon avatar Jul 12 '24 04:07 j3soon

Fixed with your PR @j3soon - thanks!

ojacques avatar Oct 03 '24 19:10 ojacques