Skip to content

Commit 431ac98

Browse files
Add labeler workflow to automatically label pr's (#11)
1 parent 33cf846 commit 431ac98

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.github/labeler.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Label definitions for actions/labeler
2+
3+
# Templates label for changes to markdown-templates directory
4+
templates:
5+
- changed-files:
6+
- any-glob-to-any-file: "markdown-templates/**/*"
7+
8+
# Workflows label for changes to GitHub workflow files (excluding changes that only change workflows prefixed with _)
9+
workflows:
10+
- changed-files:
11+
- all-globs-to-any-files:
12+
- ".github/workflows/*.yml"
13+
- "!.github/workflows/_*.yml"
14+
15+
# Documentation label for root level .md files and files in /docs/ directory
16+
documentation:
17+
- changed-files:
18+
- any-glob-to-any-file:
19+
- "*.md"
20+
- "docs/**/*"

.github/workflows/_labeler.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Label PRs
2+
on:
3+
- pull_request_target
4+
5+
jobs:
6+
labeler:
7+
name: PR Labeler
8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/labeler@v5
14+
with:
15+
sync-labels: true

0 commit comments

Comments
 (0)