ojacques/mkdocs-git-committers-plugin-2

Support co-authored commits

tarensanders opened this issue · 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.

Guts commented

Interested too in this feature.

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

Guts commented

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

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.