Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jimmycuadra/ghlabel
Automatically creates and deletes labels on GitHub Issues to match a template
https://github.com/jimmycuadra/ghlabel
application developer-tools github github-api github-issues rust utility
Last synced: 3 months ago
JSON representation
Automatically creates and deletes labels on GitHub Issues to match a template
- Host: GitHub
- URL: https://github.com/jimmycuadra/ghlabel
- Owner: jimmycuadra
- License: mit
- Created: 2015-09-13T13:14:20.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-24T13:27:30.000Z (over 8 years ago)
- Last Synced: 2024-04-25T01:08:31.615Z (6 months ago)
- Topics: application, developer-tools, github, github-api, github-issues, rust, utility
- Language: Rust
- Size: 9.77 KB
- Stars: 35
- Watchers: 6
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - jimmycuadra/ghlabel - Automatically creates and deletes labels on GitHub Issues to match a template (Rust)
README
# ghlabel
A tool to automatically create and delete labels on GitHub Issues to match a YAML template.
When you create a new repository on GitHub, the default labels in the issue tracker are fine for basic use.
Sometimes you prefer to organize your labels differently and you like to use your own labels on every project.
Doing this manually via the web interface can be quite painful if you have a lot of repositories and/or a lot of labels.
ghlabel helps you save time by running one command to set a repository's labels to exactly those defined in your YAML template.## Installation
Binary releases for Mac OS X and Linux are available on the [releases page](https://github.com/jimmycuadra/ghlabel/releases).
## Usage
```
ghlabel [FLAGS] --file --token --user --repoFLAGS:
-d, --dry-run Print what the program would do without actually doing it
-h, --help Prints help information
--no-create Do not create labels missing from the repo but present in the file
--no-delete Do not delete labels in the repo that are not in the file
-v, --version Prints version informationOPTIONS:
-e, --endpoint API endpoint to use (defaults to https://api.github.com)
-f, --file Path to a YAML file containing the label template
-r, --repo The name of the repository to apply the label template to
-t, --token OAuth token for authenticating with GitHub
-u, --user The name of the user or organization that owns the repository
```Example:
```
ghlabel --file labels.yml --token abc123 --user rust-lang --repo rust
```The file must contain an array of hashes, each with a name and a color. For
example, here is a template for a subset of the default GitHub Issues labels:``` yaml
- name: bug
color: fc2929
- name: duplicate
color: cccccc
- name: enhancement
color: 84b6eb
```By default, every label in the file will be created (or updated, if the color
changed) on GitHub if it doesn't already exist and every label on GitHub not in
the file will be deleted. Limit this behavior with the --no-create and
--no-delete flags, respectively. No output from the program indicates there
were no changes made.An OAuth token can be obtained from https://github.com/settings/tokens.
The token used requires the "repo" scope if the program will be run on a
private repo. Otherwise, it only requires the "public_repo" scope.## Example
The file `labels.yml` in this repository was used as the template to create the labels in GitHub Issues.
## License
[MIT](http://opensource.org/licenses/MIT)