Skip to content

Commit a8b23b2

Browse files
committed
first commit
0 parents  commit a8b23b2

File tree

4 files changed

+190
-0
lines changed

4 files changed

+190
-0
lines changed

.github/labels.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
- name: "priority: urgent"
2+
description: "Critical work or bug that is holding up other things"
3+
color: "#b60205"
4+
5+
- name: "priority: high"
6+
description: "Important features or user-visible bugs that should be done soon"
7+
color: "#fbca04"
8+
9+
- name: "priority: medium"
10+
description: "Should be done but isn't prioritised ahead of others"
11+
color: "#88660f"
12+
13+
- name: "priority: low"
14+
description: "Not important and unlikely to be done unless it becomes important"
15+
color: "#9ab562"
16+
17+
- name: "status: blocked"
18+
description: "Blocked by another issue or external requirement"
19+
color: "#b60205"
20+
21+
- name: "status: duplicate"
22+
description: "Indicates similar issues, pull requests, or discussions"
23+
color: "#cfd3d7"
24+
from_name: "duplicate"
25+
26+
- name: "status: cooking"
27+
description: "WIP changes that are being actively worked on"
28+
color: "#006b75"
29+
30+
- name: "status: good first issue"
31+
description: "A good issue for first-time contributors"
32+
color: "#008672"
33+
from_name: "good first issue"
34+
35+
- name: "status: help wanted"
36+
description: "Help requested for an issue or pull request"
37+
color: "#008672"
38+
from_name: "help wanted"
39+
40+
- name: "status: invalid"
41+
description: "This doesn't seem right"
42+
color: "#e4e669"
43+
from_name: "invalid"
44+
45+
- name: "status: wontfix"
46+
description: "This will not be worked on"
47+
color: "#ffffff"
48+
from_name: "wontfix"
49+
50+
- name: "status: on hold"
51+
description: "Other issues are taking priority"
52+
color: "#a2eeef"
53+
54+
- name: "type: bug"
55+
description: "Something isn't working"
56+
color: "#d73a4a"
57+
from_name: "bug"
58+
59+
- name: "type: ci & build"
60+
description: "Related to build or continuous integration files and scripts"
61+
color: "#f7c3d8"
62+
63+
- name: "type: dependencies"
64+
description: "Referring to or updating a dependency file"
65+
color: "#f7c3d8"
66+
67+
- name: "type: 3rd party"
68+
description: "Regarding a 3rd party API/script/package/dependency"
69+
color: "#f7c3d8"
70+
71+
- name: "type: documentation"
72+
description: "Improvements or additions to documentation"
73+
color: "#0075ca"
74+
from_name: "documentation"
75+
76+
- name: "type: enhancement"
77+
description: "New enhancement or improvement"
78+
color: "#006b75"
79+
from_name: "enhancement"
80+
81+
- name: "type: feature"
82+
description: "New feature request"
83+
color: "#006b75"
84+
85+
- name: "type: question"
86+
description: "Further information is requested or needed"
87+
color: "#d876e3"
88+
from_name: "question"
89+
90+
- name: "github_actions"
91+
description: "Pull requests that update GitHub Actions code or configuration"
92+
color: "#000000"

.github/workflows/labeler.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Manage labels"
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
paths:
8+
- ".github/labels.yml"
9+
- ".github/workflows/labeler.yml"
10+
pull_request:
11+
paths:
12+
- ".github/labels.yml"
13+
- ".github/workflows/labeler.yml"
14+
15+
jobs:
16+
labeler:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
issues: write
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
- name: Run Labeler
25+
uses: crazy-max/ghaction-github-labeler@v5
26+
with:
27+
github-token: ${{ secrets.GITHUB_TOKEN }}
28+
yaml-file: .github/labels.yml
29+
dry-run: ${{ github.event_name == 'pull_request' }}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) David Schargel and [crazy-max](https://github.com/crazy-max/ghaction-github-labeler/blob/master/LICENSE)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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

Comments
 (0)