elixirsc / git-pair

Automatically adds `Co-authored-by` mark when you're pairing
https://hex.pm/packages/git_pair
MIT License
8 stars 0 forks source link

Determine co-author anonymous email by remote `origin` address #27

Open wevtimoteo opened 4 years ago

wevtimoteo commented 4 years ago

Currently, our utility only considers GitHub anonymous emails. We should check if git remote origin address contains GitHub or GitLab to build proper source provider anonymous email.

Sub tasks:

$ git shortlog --summary --email --committer
     
     3  👻 <doo@example.com>
 
     1  👻 Doo <john@example.com>

Notes:

Decide how and when we are going to store the co-authors status from git shortlog --summary --email --committer
 command.

Currently stored data on git config ⬇️:

[pair]
 
     coauthor = 👻

We are proposing something like ⬇️ :

[pair]
 
     coauthor = 👻 <doo@example.com>
 
wevtimoteo commented 4 years ago

We should take a look at .mailmap to store known authors:

https://www.git-scm.com/docs/git-shortlog/2.18.0#_mapping_authors https://blog.developer.atlassian.com/aliasing-authors-in-git/