-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mateusz Urbanek <[email protected]>
- Loading branch information
Showing
5 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# Labeler - Declarative GitHub Label Syncing CLI Tool | ||
|
||
[![GitHub Release](https://img.shields.io/github/v/release/shanduur/labeler)](https://github.com/shanduur/labeler/releases/latest) | ||
[![GitHub License](https://img.shields.io/github/license/shanduur/labeler)](LICENSE) | ||
|
||
Labeler is a command-line interface (CLI) tool designed to facilitate the declarative synchronization of GitHub labels across repositories. This tool provides an efficient and convenient way to manage labels in a GitHub repository by enabling users to define label configurations in a YAML file and then apply or retrieve these configurations using the provided commands. | ||
|
||
## Table of Contents | ||
|
||
- [Labeler - Declarative GitHub Label Syncing CLI Tool](#labeler---declarative-github-label-syncing-cli-tool) | ||
- [Table of Contents](#table-of-contents) | ||
- [Usage](#usage) | ||
- [Uploading Labels](#uploading-labels) | ||
- [Downloading Labels](#downloading-labels) | ||
- [Configuration File](#configuration-file) | ||
- [Examples](#examples) | ||
- [License](#license) | ||
- [Changelog](#changelog) | ||
|
||
## Usage | ||
|
||
### Uploading Labels | ||
|
||
To sync labels from a file to a GitHub repository, use the following command: | ||
|
||
```bash | ||
labeler upload [options] <path-to-labels-file> | ||
``` | ||
|
||
Example: | ||
|
||
```bash | ||
labeler upload --repository <owner>/<repo> examples/cli/labels.yaml | ||
``` | ||
|
||
### Downloading Labels | ||
|
||
To download and print GitHub repository labels to a file, use the following command: | ||
|
||
```bash | ||
labeler download [options] <path-to-output-file> | ||
``` | ||
|
||
Example: | ||
|
||
```bash | ||
labeler download --repository <owner>/<repo> examples/cli/labels.yaml | ||
``` | ||
|
||
**Note:** Replace `<owner>/<repo>` with the GitHub owner and repository name you intend to work with. | ||
|
||
## Configuration File | ||
|
||
The configuration file for Labeler is a YAML file that defines the labels and their attributes to be synchronized with a GitHub repository. Below is an example of a label configuration file: | ||
|
||
```yaml | ||
- name: dependency | ||
color: '#dadada' | ||
description: Dependency updates | ||
- name: feature-request | ||
color: '#61dafb' | ||
description: Request for a new feature or enhancement | ||
- name: documentation | ||
color: '#007bc7' | ||
description: Issues related to documentation | ||
- name: bug | ||
color: '#d73a4a' | ||
description: Something isn't working as expected | ||
``` | ||
In this example, each label is defined with the following attributes: | ||
- **name:** The name of the label. | ||
- **color:** The color associated with the label, specified in hexadecimal format. | ||
- **description:** A brief description of the label's purpose or meaning. | ||
Ensure that the configuration file adheres to the YAML syntax, and you can customize it according to your project's specific label requirements. | ||
## Examples | ||
Example label configurations are provided in the `examples` directory for different scenarios, including CLI, Kubernetes, and Moby projects. | ||
|
||
## License | ||
|
||
Labeler is licensed under the [MIT License](LICENSE). | ||
|
||
## Changelog | ||
|
||
Check out the [Changelog](CHANGELOG.md) to see the release history and updates. | ||
|
||
For detailed information on commands and options, run `labeler help`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module github.com/shanduur/labeler | ||
|
||
go 1.20 | ||
go 1.21 | ||
|
||
require ( | ||
github.com/google/go-github/v53 v53.2.0 | ||
|