Skip to content

Commit e9292e6

Browse files
authored
ci: add PR labeler configuration and workflow (#357)
1 parent ff3f641 commit e9292e6

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.github/pr-labeler.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'release: feature':
2+
- '/^(feat|types|style)/'
3+
'release: bug fix':
4+
- '/^fix/'
5+
'release: performance':
6+
- '/^perf/'
7+
'release: breaking change':
8+
- '/^breaking change/'
9+
'release: document':
10+
- '/^docs/'
11+
'release: refactor':
12+
- '/^refactor/'

.github/workflows/pr-label.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: PR Labeler
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
9+
permissions:
10+
# Permits `github/issue-labeler` to add a label to a pull request
11+
pull-requests: write
12+
contents: read
13+
14+
jobs:
15+
change-labeling:
16+
name: Labeling for changes
17+
runs-on: ubuntu-latest
18+
if: github.repository == 'web-infra-dev/rslint'
19+
steps:
20+
- uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4
21+
with:
22+
repo-token: '${{ secrets.GITHUB_TOKEN }}'
23+
configuration-path: .github/pr-labeler.yml
24+
enable-versioned-regex: 0
25+
include-title: 1
26+
sync-labels: 1

0 commit comments

Comments
 (0)