github-adm is a command-line tool written in Go that helps you manage and synchronize labels in your GitHub repositories.
To install github-adm, you'll need to have Go installed. You can install it using Go's package manager, go get
:
go get -u github.com/mkumatag/github-adm
The sync-labels
command allows you to synchronize GitHub labels with labels defined in a JSON file. This can be useful for maintaining a consistent set of labels across multiple repositories or simply ensuring that your labels are in sync with a predefined set.
github-adm sync-labels [options]
github-adm sync-labels --help
can be used to list all the options.
To synchronize labels for the repository "example/repo" with labels defined in a JSON file and remove any labels not in the JSON file:
GH_TOKEN=<GH_TOKEN> github-adm sync-labels --base-url https://github.ibm.com/api/v3 --upload-url https://uploads.github.ibm.com/ --org org --repo repo --manifest labels.json --delete-out-of-sync`
The labels.json
file should contain label definitions in the following format:
[
{
"name": "bug",
"color": "d73a4a"
},
{
"name": "enhancement",
"color": "a2eeef"
},
{
"name": "documentation",
"color": "0075ca"
}
// Add more labels as needed
]
If you prefer to build github-adm from source, you can use the following steps:
- Clone the repository:
git clone https://github.com/mkumatag/github-adm.git
- Build the project:
cd github-adm
go build
- Install the binary:
go install
If you'd like to contribute to this project, please check out the CONTRIBUTING.md file for guidelines.
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
If you have any questions or need assistance, feel free to contact us at [email protected].
Happy labeling with github-adm!