Closed introt closed 1 year ago
Hi @introt
Thanks for the idea and it could be a valuable addition to Git Mob.
Using the GitHub username to form the co-author metadata is what we should start with.
What I understand from your script and GitHub API restrictions, it's only possible to construct their anonymous email because their public email would only be available using authentication. Does this sound correct to you?
Hi @rkotze
Yes, only anonymous emails are available without authentication^auth, but creating a personal access token[^token] to access public emails is pretty straight-forward.
I personally prefer using the anonymous emails as they'll "never" stop working[^work], but using public emails with anonymous ones as a fallback is imo an important option to have for people working in a corporate context.
[^token]: https://github.com/settings/tokens - needs no extra scopes [^work]: Changing ones login doesn't affect their id number, while people might want to change their email address along with their legal name
Summary
Add the ability to add coauthors via GitHub usernames or issue/pull request urls using the GitHub REST API.
Motivation
Adding unknown people, especially if you don't know their emails, is time consuming. This feature would make it as simple as
git add-coauthor ir introt
, orgit add-coauthor ir https://github.com/findmypast-oss/git-mob/issues/74
.Describe alternatives you've considered
Using an external tool.
Additional context
Reference implementation for API usage: https://gist.github.com/introt/ad30bcbdf789aed5bba43082741c7769