Skip to content

ansor4/auto-add-authors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Auto-add Authors

This script looks through the git log of a repo and adds their initials to your ~/.git-authors file. This can be helpful if you use git duet a lot.

Tech

The script uses Python 3, GitPython, and PyYAML.

Run It

~ > cd git-repo
~/git-repo > ./auto_add_authors.py
aw ansor4@xyz.com Anson Wang

found these unique initials
('aw', 'ansor4@xyz.com', 'Anson Wang')

Adding them to .git-authors
~/git-repo > cat ~/.git-authors
authors:
  aw: Anson Wang
email_addresses:
  aw: anson.wang@artsymail.com
~/git-repo >

The script will never overwrite existing initials/authors in your ~/.git-authors file, so run it wherever!

Todos

  • Write tests
  • Python 2.7 compatibility
  • Repo-aware initials
  • Fuzzy match initials and combine initials and e-mails
  • Generate .mailmap

About

Auto-add Authors to your .git-authors file!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages