Skip to content

Latest commit

 

History

History
149 lines (83 loc) · 2.3 KB

ghlabel.md

File metadata and controls

149 lines (83 loc) · 2.3 KB

🔴 ghlabel

Setup Github Labels from a yaml/json config file.

Usage:

$ ghlabel [OPTIONS] COMMAND [ARGS]...

🔶 Options:

--version, -v

Show version and exit.

--debug, -D

Enable debug mode and show logs.

--help, -h

Show this message and exit.


Commands:

dump

Generate starter labels config files.

setup

Add/Remove Github labels from config files.


🔴 ghlabel dump

Generate starter labels config files.

Usage:

$ ghlabel dump [OPTIONS]

🔶 Options:

--new, -n / --keep-old-labels, -N [default: new]

Deletes all files in labels dir.

--dir, -d TEXT [default: labels]

Specify the dir where to find labels.

--ext, -e [json|yaml] [default: yaml]

Label file extension.

--app, -a [app|game|web] [default: app]

App to determine label template.

--help, -h

Show this message and exit.


🔴 ghlabel setup

Add/Remove Github labels from config files.

Usage:

$ ghlabel setup [TOKEN] [REPO_OWNER] [REPO_NAME] [OPTIONS]

🔷 Arguments:

TOKEN [optional]

REPO_OWNER [optional]

REPO_NAME [optional]


🔶 Options:

--dir, -d TEXT [default: labels]

Specify the dir where to find labels.

--strict, -s / --no-strict, -S [default: no-strict]

Strictly mirror Github labels from labels config.

--add-labels, -a TEXT

Add more labels.

--remove-labels, -r TEXT

Remove more labels.

--remove-all, -R [disable|enable|silent] [default: disable]

Remove all Github labels.

--help, -h

Show this message and exit.


Example Usage

Overriding .env or Manually adding Environment Variables

REPO_NAME=medrec ghlabel setup

Removing more labels

# -r [comma-separated string]
# will be parsed as list[str]
ghlabel setup -r "Type: Feature Request, Type: Bug"

Adding more labels

# -a [valid json string]
# will be parsed as list[dict[str, str]]
ghlabel setup -a "[{'name': 'wontfix', 'color': '#ffffff'}, {'name': 'bug', 'color': '#d73a4a', 'description': 'Something isn't working'}]"