partner

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2022 License: MIT Imports: 1 Imported by: 0

README

partner

partner is a tool for managing coauthors for git commits. It allows you to quickly annotate commits with appropriate Co-Authored-By trailers. Supports adding users by GitHub and GitLab usernames.

Usage

Add some colleagues to your list of coauthors:

# Add a few of my colleagues on GitHub
$ partner manifest gh-add GeorgeMac gavincabbage stuartcarnie

# Add a friend who doesn't use GitHub
$ partner manifest add --id=gemini [email protected] --name="Gemini Strongbeard"

# List all coauthors
$ partner manifest ls
ID            NAME                EMAIL                                          TYPE
gavincabbage  Gavin Cabbage       [email protected]  github
gemini        Gemini Strongbeard  [email protected]                         manual
GeorgeMac     George              [email protected]     github
stuartcarnie  Stuart Carnie       [email protected]    github

Activate a few for a pairing session:

# Activate George and Gavin
$ partner set GeorgeMac gavincabbage

# List the active coauthors
$ partner status
ID            NAME           EMAIL                                          TYPE
gavincabbage  Gavin Cabbage  [email protected]  github
GeorgeMac     George         [email protected]     github

partner has set a commit.template configuration for this repository with appropriate Co-Authored-By trailers. You can view this template like this:

$ cat $(git config commit.template)


# Managed by partner
#
# partner-id: gavincabbage
Co-Authored-By: "Gavin Cabbage" <[email protected]>
# partner-id: GeorgeMac
Co-Authored-By: "George" <[email protected]>

The template will be used as a starting point for any commit messages you author with your party. Remember: Using git commit --message overrides the entire commit message and will not use the template.

To clean up:

# Unset all coauthors
$ partner clear

# No one is active now
$ partner status

Install

$ go get -u github.com/brettbuddin/partner

Environment Variable Overrides

Environment Variable Default Value Description
PARTNER_MANIFEST ~/.config/partner/manifest.json Configuration file holding all add-ed coauthors.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL