/coauthors

Add coauthors to your last git commit message

Primary LanguagePythonMIT LicenseMIT

coauthors

Add coauthors to your last git commit message.

Install

To install coauthors, just run:

$ sudo python3 -m pip install coauthors # for system wide pip --break-system-packages

Configure

First create a config file with your coauthors.

Example ~/.coauthors.json:

{
  "Faemino":
  {
    "name": "Juan Carlos Arroyo",
    "email": "faemino@comedian.com"
  },
  "Cansado":
  {
    "name": "Angel Javier Pozuelo",
    "email": "cansado@comedian.com"
  }
}

Then add the following line to your sources file (.bashrc, .zshrc, ...):

export PATH="$HOME/.local/bin:$PATH" # for system wide pip
export COAUTHORS_FILE="/home/<user>/.coauthors.json"

Usage

You can coauthor your commit with one friend

$ coauthors Faemino

or with many

$ coauthors Faemino Cansado

You can list your available coauthors

$ coauthors --list