1.0.2 • Published 4 years ago

give-credit-where-due v1.0.2

Weekly downloads
5
License
AGPL3
Repository
github
Last release
4 years ago

Give Credit Where Due

Code is rarely derived alone. Good code comes from interactions from friends, co-workers, acquaintances.

Git commit trailers indicating co-authorship is a great way to give credit where due. Finding the information to write that trailer is not always intuitive.

Requirements

  • nodejs (latest LTS (v14) was used to write command)
  • libsecret sudo apt-get install -y libsecret-1-0
  • libsecret-tools sudo apt-get install -y libsecret-tools

While it doesn't explicitly run only on Ubuntu, it has been developed and tested solely on Ubuntu 20.04

Usage

Global install

npm install -g give-credit-where-due

Local install

git clone https://github.com/neenjaw/give-credit-where-due.git

Then it can be used:

> node give-credit-where-due/cli.js

Command line usage

> give-credit [github_user_names...]

The following flags may also be used instead:
  --set-token token\tset a new github personal access token
  --show-token\t\tshow the current github personal access token
  --unset-token\t\tunset github personal access token`

How does it work

This command uses a github personal access token, stored in the libsecret "Secret Service". Then it uses the Oktokit rest api to do a user lookup, getting the user's name and email to build the commit trailer string.