Synchronize GitHub issue labels across repositories
- .NET SDK
~$ dotnet tool install -g GitHubLabelSync
- Generate a Personal Access Token in GitHub from https://github.com/settings/tokens/new with the following access:
repo
delete_repo
- keep this key/token in a safe and private place, as you'll need it to sync your labels
Good question!
The GitHub API does not provide direct access to default labels, and so they are obtained by creating (and immediately deleting) a temporary private repository.
You can see the code that performs these actions here.
~$ sync-labels <org/username> [options]
This tool is designed for GitHub organization administrators, as organizations have the ability to set the default labels for new repositories.
Individual users are limited to GitHub's default set of issue labels, but this tool can still be used to ensure all of your repositories have the latest set.
-k
or--api-key
: (required) GitHub API Key (Personal Access Token)-f
or--filter
: only sync repositories that match the provided regular expression-a
or--no-add
: do not add new labels-e
or--no-edit
: do not edit existing labels-d
or--no-delete
: do not delete stale labels-r
or--dry-run
: do not perform any actions (equivalent to-a -e -d
)-h
or--help
: view this information from the command line
Please be sure to read and follow ecoAPM's Contribution Guidelines when submitting issues or pull requests.