Repository navigation
Labeler 6 is a rewrite in TypeScript. Every command from v5 is still present and works the same way, but some things around them have changed, a few of them in breaking ways. Please read the breaking changes before upgrading, especially when running Labeler from scripts.
Breaking changes
- Settings and labels have moved to a new folder. They are imported automatically on the first run.
- Node.js 22.13 or newer is required. Labeler runs on Node.js 22 (22.13.0 or newer), 24 and 26. v5 ran on Node.js 14.16 and newer.
- Errors now exit with code
1. v5 exited with0even when something went wrong. - The licence is now GPL-3.0-or-later, instead of MIT.
Find more details below.
Upgrading
npm install --global labelerThe token, owner and labels come along automatically: the first v6 run imports the v5 settings and reports what it brought over.
New
- Fine-grained tokens. The README now explains how to create a fine-grained personal access token limited to chosen repositories. Classic tokens still work if preferred.
-v/--versionprints the installed version.- A pinned GitHub API version. Labeler now asks GitHub for a fixed version of its REST API, so changes on GitHub's side can't change how Labeler behaves:
2026-03-10on github.com and2022-11-28on GitHub Enterprise Server. Either can be changed withlabeler -c, for example on an Enterprise Server running 3.22 or newer. - A clearer bulk update error.
-bwithout a GitHub Enterprise host now says it needs one, instead of failing with a confusing 404.
Fixed
- Bulk updates (
-b) work again. In v5 they crashed before updating a single repository. They now also work for organizations with 0 or 1 repositories. -ddeletes up to 100 labels. v5 only ever saw the first 30 and left the rest behind.- Saving the config no longer touches the labels. v5 also wrote the config values into
labeler_labels.json.
Removed
- Update notifications. v5 announced newer versions published on npm. v6 no longer checks.
Under the hood
- Fewer, up-to-date dependencies:
- Labeler now depends on 4 packages instead of 7.
- An installation pulls in 49 packages instead of 206.
- The installation size on disk decreased from 25 MB to 7.9 MB.
- v5 carried 24 known security advisories, while v6 installs with no known vulnerabilities.
- Automated tests:
- 93 unit tests now cover the code that talks to GitHub, stores the settings and asks the questions.
- Every pull request is checked on Node.js 22, 24 and 26.
Details
Settings and labels have moved
v5 stored them in ~/.config/configstore/labeler.json and labeler_labels.json. v6 keeps them in config.json and labels.json, in the platform's usual folder for settings:
| Platform | Folder |
|---|---|
| Linux | ~/.config/labeler-nodejs/ |
| macOS | ~/Library/Preferences/labeler-nodejs/ |
| Windows | %APPDATA%\labeler-nodejs\Config\ |
labeler -p prints the location of labels.json.
Nothing needs to be done by hand. The first v6 run, whichever command it is, imports both files, deletes the two old ones and reports it. Nothing else in ~/.config/configstore/ is touched, since other tools keep their files there too.
If the import doesn't happen, for example because the files had been moved, they can be copied by hand, as their format hasn't changed:
configstore/labeler.jsonbecomesconfig.json.configstore/labeler_labels.jsonbecomeslabels.json.
Both go into the folder labeler -p shows.
Errors now exit with code 1
In v5, a script couldn't tell a failed run from a successful one. A script that runs Labeler under set -e, or checks its exit code, now stops on a failure where it used to carry on. Declining a confirmation or pressing Ctrl+C still exits with 0.
The licence is now GPL-3.0-or-later
Using Labeler is unaffected. Redistributing it, modified or not, now has to happen under the GPL, which includes making the source available.
Full changelog: v5.0.1...v6.0.0