Skip to content

Commit b8fe491

Browse files
tongyimingmikatong
andauthored
feat: pr lable (#1250)
Co-authored-by: mikatong <mikatong@tencent.com>
1 parent 7906ae3 commit b8fe491

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

.github/labeler-pr-triage.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
github_actions:
2+
- '.github/*.yml'
3+
- '.github/workflows/*.yml'
4+
5+
tests:
6+
- any: ['tencentcloud/*_test.go']
7+
all: ['!tencentcloud/basic_test.go', '!tencentcloud/commom_test.go']
8+
9+
depend:
10+
- 'go.mod'
11+
12+
datasource:
13+
- any: ['tencentcloud/data_source*.go']
14+
all: ['!tencentcloud/data_source*_test.go']
15+
16+
resource:
17+
- any: ['tencentcloud/resource*.go']
18+
all: ['!tencentcloud/resource*_test.go']
19+
20+
service:
21+
- 'tencentcloud/service_*.go'
22+
23+
extension:
24+
- 'tencentcloud/extension_*.go'
25+
26+
basic:
27+
- 'tencentcloud/basic_test.go'
28+
- 'tencentcloud/commom_test.go.go'
29+
- 'tencentcloud/common.go'
30+
31+
doc:
32+
- 'website/**/*'
33+
- 'README.md'
34+
35+
trigger_label_event:
36+
- '*'

.github/workflows/pr_label.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Pull Request Labeler
2+
3+
on:
4+
# Triggers the workflow on pull request context
5+
pull_request:
6+
types: [ opened, edited, reopened, synchronize ]
7+
jobs:
8+
Labeler:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Remove Labels
12+
uses: andymckay/labeler@master
13+
with:
14+
remove-labels: "trigger_label_event"
15+
repo-token: ${{ secrets.MY_TOKEN }}
16+
17+
- name: Apply Labels
18+
uses: actions/labeler@v4
19+
with:
20+
configuration-path: .github/labeler-pr-triage.yml
21+
repo-token: ${{ secrets.MY_TOKEN }}
22+
sync-labels: true

0 commit comments

Comments
 (0)