Skip to content

Commit 97dd747

Browse files
authored
Automatically add and remove specific labels (#59)
* Create labeler.yml to auto-label PRs * Create labeler workflow * Auto-remove issue labels on close * Auto-remove PR labels on merge/close
1 parent 203e2bc commit 97dd747

File tree

4 files changed

+53
-0
lines changed

4 files changed

+53
-0
lines changed

.github/labeler.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
'status:awaiting review':
2+
- '**/*'

.github/workflows/labeler.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: "PR Labeler"
2+
3+
on:
4+
pull_request_target:
5+
types: ["opened", "reopened", "ready_for_review"]
6+
7+
jobs:
8+
triage:
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/labeler@v4
15+
if: ${{ github.event.pull_request.draft == false }}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Remove issue labels
2+
3+
on:
4+
issues:
5+
types: [closed]
6+
7+
jobs:
8+
remove_label:
9+
permissions:
10+
contents: read
11+
issues: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions-ecosystem/action-remove-labels@v1
15+
with:
16+
labels: |
17+
status:triaged
18+
status:more data needed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Remove PR Labels
2+
3+
on:
4+
pull_request_target:
5+
types: ["closed", "merged"]
6+
7+
jobs:
8+
remove_label:
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions-ecosystem/action-remove-labels@v1
15+
with:
16+
labels: |
17+
status:awaiting review
18+
status:awaiting user response

0 commit comments

Comments
 (0)