|
| 1 | +# GitHub Labeler Starter Setup |
| 2 | + |
| 3 | +This starter setup automates GitHub label management using the crazy-max [GitHub Labeler GitHub Action (v5+)](https://github.com/crazy-max/ghaction-github-labeler) that allows developers to manage and organize their GitHub labels. It GitHub Action to manage labels on GitHub (create/rename/update/delete) as code. |
| 4 | + |
| 5 | +It helps if you are working on a fresh repository or one where you did not change any of the initial labels but you can also use it on existing repositories. |
| 6 | + |
| 7 | +GitHub Labels are declared as code in `.github/labels.yml` and synchronized by the GitHub Actions workflow in `.github/workflows/labeler.yml`. |
| 8 | + |
| 9 | +## Key Files |
| 10 | +- `.github/labels.yml` — Single source of truth for labels. Fields: `name`, `description`, `color` (lowercase hex with leading `#`), optional `from_name` for renames. Keep two‑space indentation and double‑quoted strings. |
| 11 | +- Even though it is not required by the system, this Starter uses categories that follow prefix `priority:`, `status:`, and `type:` naming (e.g., `"priority: urgent"`). |
| 12 | +- `.github/workflows/labeler.yml` — "Manage labels" workflow. Triggers on changes to label config (PR dry‑run, push applies). Uses `crazy-max/ghaction-github-labeler@v5` with `yaml-file: .github/labels.yml` and `exclude` rules for `help*` and `*issue`. |
| 13 | + |
| 14 | +## Deployment |
| 15 | +- Add `.github/labels.yml` and `.github/workflows/labeler.yml` to your repository. |
| 16 | +- Add/modify labels in `.github/labels.yml`. This Starter adds new labels and changes the "standard" labels in your repository to match the configuration in this file. |
| 17 | +- Optionally validate the YAML: `yamllint .github/labels.yml`. Note that the GitHub Action automatically lints the YAML file during execution. |
| 18 | +- Open a PR; the workflow previews changes without applying. After merge to `main`, labels sync automatically. |
| 19 | +- For immediate sync post‑merge: `gh workflow run "Manage labels" --ref main`. |
| 20 | + |
| 21 | +## Disabling the Workflow after Setup |
| 22 | +To disable the GitHub Actions workflow after setting up your labels, you can either: |
| 23 | +- Delete the `.github/workflows/labeler.yml` and `.github/labels.yml` files from your repository. |
| 24 | +- Or, disable GitHub Actions for the repository in the repository settings under the "Actions" tab. |
| 25 | + |
| 26 | +## Original GitHub Labels |
| 27 | +- Reference defaults: [ghaction-github-labeler/samples/original.yml](https://github.com/crazy-max/ghaction-github-labeler/blob/master/samples/original.yml) |
| 28 | + |
| 29 | +## Support |
| 30 | + |
| 31 | +This software is provided as is and I am not implementing or accepting any support requests or contributions. Please be aware that I may or may not respond to any issue or address any issues. |
| 32 | + |
| 33 | +> If you want to ask a question, I assume that you have read the following 2 files: [GitHub Labeler GitHub Action README.md](https://github.com/crazy-max/ghaction-github-labeler/blob/master/README.md) and this repository's [Documentation](https://github.com/DavidSchargel/github-labeler-starter/README.md). |
| 34 | +
|
| 35 | +If you then still feel the need to ask a question and need clarification, I recommend the following: |
| 36 | + |
| 37 | +- Do a search in the GitHub Labeler GitHub Action [Open Issues](https://github.com/crazy-max/ghaction-github-labeler/issues?utf8=%E2%9C%93&q=) to see if the issue or feature request has already been filed for the software that drives this Starter. |
| 38 | +- Do a search in this Starter's [Open Issues](https://github.com/DavidSchargel/github-labeler-starter/issues?utf8=%E2%9C%93&q=) to see if the issue has been added. |
| 39 | +- If it pertains to the GitHub Labeler GitHub Action, create an [Issue](https://github.com/crazy-max/ghaction-github-labeler/issues/new/choose) on that repository. |
| 40 | +- If the issue pertains to this Starter, open an [Issue](https://github.com/DavidSchargel/github-labeler-starter/issues/new). |
| 41 | +- Provide as much context as you can about what you're running into. |
| 42 | + |
| 43 | +## License |
| 44 | +- [MIT](https://choosealicense.com/licenses/mit/) |
| 45 | + |
| 46 | +## Authors |
| 47 | +- [@crazy-max](https://www.github.com/crazy-max) |
| 48 | +- [@DavidSchargel](https://www.github.com/DavidSchargel) |
0 commit comments