Skip to content

Commit 72df54d

Browse files
authored
Add applicable project labels and ensure PRs have one of Task,Bug (#71)
* Add applicable project labels and ensure PRs have one of Task,Bug * Label auditor to apply labels
1 parent f4b4b77 commit 72df54d

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

.github/allowed-labels.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Labels for tracking statistics and history
2+
- name: Task
3+
color: f5f7f9
4+
description: "A general update to the code base for language clarification, missing actions, tests, etc."
5+
- name: Bug
6+
color: f5f7f9
7+
description: "An update to fix incorrect code or typos."
8+
9+
# Labels to visually distinguish special types of issues
10+
- name: Urgent
11+
color: "00FFFF"
12+
description: "Very important and needs attention"
13+
- name: Epic
14+
color: "d8bfd8"
15+
description: "Contains many smaller pieces to work on separately"
16+
- name: Internal
17+
color: "f2bb22"
18+
description: "To help track internal tickets in a single location."

.github/workflows/label_auditor.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "Audit Labels"
2+
3+
on: # yamllint disable-line rule:truthy
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- main
8+
types:
9+
- closed
10+
jobs:
11+
label-linter:
12+
name: Audit Labels
13+
permissions:
14+
contents: read
15+
pull-requests: write
16+
runs-on: ubuntu-latest
17+
if: github.event.pull_request.merged == true
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
sparse-checkout: .github/allowed-labels.yml
23+
sparse-checkout-cone-mode: false
24+
25+
# The Audit Labels workflow creates, renames, updates
26+
# or deletes labels based on a list of allowed labels.
27+
#
28+
# To use this workflow, you must set up and configure
29+
# labels in a .github/allowed-labels.yml file
30+
#
31+
# For more information, see:
32+
# https://github.com/crazy-max/ghaction-github-labeler
33+
- name: Audit Labels
34+
if: success()
35+
uses: crazy-max/ghaction-github-labeler@v4
36+
with:
37+
github-token: ${{ secrets.GITHUB_TOKEN }}
38+
yaml-file: .github/allowed-labels.yml
39+
skip-delete: true
40+
dry-run: false

0 commit comments

Comments
 (0)