
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
__ _ _
/ / __ _| |__ ___| | ___ _ __
/ / / _` | '_ \ / _ \ |/ _ \ '__|
/ /__| (_| | |_) | __/ | __/ |
\____/\__,_|_.__/ \___|_|\___|_|
Easily manage default labels in GitHub repositories
Because I was sick of always deleting the default labels and uploading my own ones.
By storing custom labels in a labels.json file, deleting the default ones from the repository and uploading those from said file.
npm install --global labeler
NAME
labeler - Label manager for GitHub repositories.
SYNOPSIS
labeler [OPTIONS]
DESCRIPTION
Create custom labels on GitHub repositories automatically.
This CLI helps you organize your GitHub labels by storing them in a 'labels.json' file. You can add new labels through the CLI with the -n flag.
Whenever you create a new repository, instead of manually uploading your labels, use this CLI to have it done automatically!
OPTIONS
-b, --bulkUpdate
Update all repositories under GHE owner organization. Can only be used with a GitHub Enterprise host.
-c, --config
Launch interactive CLI to store data into config. Storing empty strings removes data from config.
-d, --deleteAllLabels
Delete all existing labels in repository.
-e, --emptyLabelsFile
Remove every label from the 'labels.json' file.
-f, --force
Ignore user confirmation.
-h, --help
Display this help page.
-H, --host [HOST]
Specify host. If not specified uses values in config, else ignores config.
-n, --newLabel
Launch interactive CLI to store new labels in the 'labels.json' file.
-o, --owner [OWNER]
Specify owner of repository. If not specified uses values in config, else ignores config.
-p, --path
Return the path for 'labels.json' file.
-r, --repository [REPOSITORY]
Specify GitHub repository name. If not specified uses values in config, else ignores config.
-R, --resetLabelsFile
Reset 'labels.json' by overwriting 'labels.json' with the default labels.
-t, --token [TOKEN]
Specify personal access token. If not specified uses values in config, else ignores config.
-u, --uploadLabels
Upload custom labels to repository. Skips already existing labels.
EXAMPLES
Delete all labels from the repository and upload custom ones stored under 'labels.json' to the repository:
labeler -dur Labeler
Same as above but without the confirmation questions:
labeler -fdur Labeler
Delete every label from 'labels.json' and add new labels to it:
labeler -en
Using GitHub Enterprise hosts:
labeler -dur Labeler -H github.yourhost.com
Delete and upload all labels from a GHE organization:
labeler -dub -H github.yourhost.com
I've tried my best to create a tool for everyone! If you prefer using flags, feel free to run labeler -t [TOKEN] -o [OWNER] -r [REPOSITORY] -du. If you fancy writing less, run labeler -c and save your values. Those will be your default ones (unless overridden by a flag).
labeler comes with some predefined labels, but you can of course use your own. By running labeler -en, you'll start a fresh new file. The path to the file will be in the terminal, in case you prefer to open and edit it with your editor of choice.
labeler -cInteractive CLI for the config. Most likely the first command to run. I recommend setting the token and the owner, as they rarely change usually. If you want to remove an entry, simply enter nothing when asked.
repo and admin:org.Zebiano for example.labeler. It is not recommended to set this setting as it may cause non-intentional deletions of labels.github.yourhost.com.In case you need to access a repository from another owner, simply run the -o [OWNER] flag and the one stored in the config will be ignored.
labeler -nAn interactive CLI to help you add new Labels to the labels.json file. You'll be asked wether you want to start a new file, or add labels to the already existing one. It also shows the path.
Bug :beetle:This is a bug.FC271EAlternatively, run labeler -en. This way, every label inside the labels.json file will be removed first.
Note: Running labeler -fn will bypass the question, which defaults to "keep file as is".
labeler -fdur [REPOSITORY]A very specific example, yet the one I think will be the most used. It's assumed that token and owner are set in the config!
-f: Ignore user confirmation-d: Delete all labels from repository-u: Upload custom labels to repository-r: Specify the repositoryExample: labeler -fdur Labeler
labeler -H [HOST]In case you're using a custom host (for example a GitHub Enterprise host), use this flag to specify it. You may as well save the host in the config.
Example: labeler -fdur Labeler -H github.yourhost.com
labels.jsonThis is the file where all your custom labels are stored. Feel free to edit it. Run labeler -p to get the path. Just keep in mind it has to have the following structure:
{
"labels": [
{
"name": "Label name",
"color": "FC271E",
"description": "Label Description."
},
...
]
}
FAQs
Easily manage default labels in GitHub repositories.
The npm package labeler receives a total of 1 weekly downloads. As such, labeler popularity was classified as not popular.
We found that labeler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.