# give-credit-where-due

> A command-line tool to give credit to your github collaborators

Latest version **1.0.2** (published 2020-10-24) · AGPL3 license · 0 weekly downloads

## Install

```sh
npm install give-credit-where-due
pnpm add give-credit-where-due
yarn add give-credit-where-due
bun add give-credit-where-due
```

Provides the command `give-credit`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-10-24 |
| First published | 2020-10-24 |
| Weekly downloads | 0 |
| License | AGPL3 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 39.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tim Austin |
| Maintainers | neenjaw |

## Links

- npm: https://www.npmjs.com/package/give-credit-where-due
- Repository: https://github.com/neenjaw/give-credit-where-due
- Homepage: https://github.com/neenjaw/give-credit-where-due#readme
- Issues: https://github.com/neenjaw/give-credit-where-due/issues
- npm.io page: https://npm.io/package/give-credit-where-due

## Dependencies (2)

- [yargs](https://npm.io/package/yargs.md) ^16.1.0
- [@octokit/rest](https://npm.io/package/@octokit/rest.md) ^18.0.6

## Recent versions

- 1.0.2 (latest) — 2020-10-24
- 1.0.1 — 2020-10-24
- 1.0.0 — 2020-10-24

## README

# 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:

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

### Command line usage

```text
> 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.

---
_Source: https://npm.io/package/give-credit-where-due · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
