Skip to content

Commit 5f68db3

Browse files
authored
👷 Add CI Labeler (#392)
1 parent c8d4836 commit 5f68db3

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.github/labeler.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
internal:
2+
- all:
3+
- changed-files:
4+
- any-glob-to-any-file:
5+
- .github/**
6+
- .gitignore
7+
- all-globs-to-all-files:
8+
- '!docker-images/requirements.txt'
9+
10+
upgrade:
11+
- all:
12+
- changed-files:
13+
- any-glob-to-any-file:
14+
- docker-images/requirements.txt

.github/workflows/labeler.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Labels
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- synchronize
7+
- reopened
8+
# For label-checker
9+
- labeled
10+
- unlabeled
11+
12+
jobs:
13+
labeler:
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/labeler@v5
20+
if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }}
21+
- run: echo "Done adding labels"
22+
# Run this after labeler applied labels
23+
check-labels:
24+
needs:
25+
- labeler
26+
permissions:
27+
pull-requests: read
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: docker://agilepathway/pull-request-label-checker:latest
31+
with:
32+
one_of: breaking,security,feature,bug,refactor,upgrade,docs,internal
33+
repo_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)