git-mob icon indicating copy to clipboard operation
git-mob copied to clipboard

Ability to add coauthors via GitHub usernames or issue/pull request urls

Open introt opened this issue 3 years ago • 2 comments

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, or git 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

introt avatar Apr 21 '22 13:04 introt

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?

rkotze avatar May 21 '22 10:05 rkotze

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

introt avatar May 22 '22 08:05 introt

Feature released with v2.3.1.

rkotze avatar Oct 27 '22 22:10 rkotze