Use Case:
Identify all contributors to a commit, including those listed as Co-Authored-By in the commit message footer. Currently, the API exposes only the main author and committer, but not co-authors.
var userEmail = commit.getAuthor().getEmail();
var commiterEmail = commit.getCommitter().getEmail();
// How to get the co-author with this API?
Proposed Solution:
- Add a method to
GHCommit (or similar) that returns a list of co-authors parsed from the commit message.
- Optionally, provide a structured representation (e.g., name and email) for each co-author.
Example API:
List<GHUser> getCoAuthors();
References:
https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors#creating-co-authored-commits-on-the-command-line
Note to maintainers:
Apologies if this is currently possible, please share any snippet if you can. Thank you in advance!
Use Case:
Identify all contributors to a commit, including those listed as
Co-Authored-Byin the commit message footer. Currently, the API exposes only the main author and committer, but not co-authors.Proposed Solution:
GHCommit(or similar) that returns a list of co-authors parsed from the commit message.Example API:
References:
https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors#creating-co-authored-commits-on-the-command-line
Note to maintainers:
Apologies if this is currently possible, please share any snippet if you can. Thank you in advance!