labels
is a CLI utility to synchornize your labels in a specific GitHub repo.
At this time
labels
is only available from GitHub. I'll publish it on crates.io later.
You can install labels via several ways.
cargo install --git https://github.com/ink8bit/labels
cargo install --git https://github.com/ink8bit/labels --tag v0.1.0
cargo install --git https://github.com/ink8bit/labels --branch main
You should create a configuration file called .labelsrc
in the root of your project.
It should be a valid JSON with the following structure:
{
"owner": "repo_owner",
"repo": "repo_name",
"labels": [
{
"name": "bug",
"description": "Something isn't working",
"color": "d73a4a"
},
{
"name": "enhancement",
"description": "New feature or request",
"color": "a2eeef"
}
]
}
Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing :beetle:
will render the emoji 🪲. For a full list of available emoji and codes, see "Emoji cheat sheet.".
{
"name": ":beetle: bug",
"description": "Something isn't working",
"color": "d73a4a"
}
You should create a personal access token using GitHub UI with scope values:
repo
read:user
And export your token as an environment variable in your .zshrc
(or .bashrc
):
export LABELS_TOKEN="GITHUB_TOKEN_VALUE"
USAGE:
labels [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
help Prints this message or the help of the given subcommand(s)
list Prints labels in current repository (first 100 items)
remove Removes all labels in current repository
update Updates all labels in current repository
Print the first 100 labels from the current repo:
labels list
Update all labels from the current repo:
labels update
Remove all labels from the current repo:
labels remove