Skip to content

Commit 79d461c

Browse files
authored
build: auto label prs (#1347)
* build: auto label prs * build: auto label prs * build: auto label prs * build: auto label prs * build: auto label prs * build: update regex to support scope
1 parent b96527b commit 79d461c

File tree

3 files changed

+64
-26
lines changed

3 files changed

+64
-26
lines changed

.github/labeler.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
version: v1
2+
3+
labels:
4+
- label: 'enhancement'
5+
matcher:
6+
title: '^feat(\(\w+\))?: .*'
7+
8+
- label: 'bug'
9+
matcher:
10+
title: '^fix(\(\w+\))?: .*'
11+
12+
- label: 'refactor'
13+
matcher:
14+
title: '^refactor(\(\w+\))?: .*'
15+
16+
- label: 'documentation'
17+
matcher:
18+
title: '^docs(\(\w+\))?: .*'
19+
20+
- label: 'test'
21+
matcher:
22+
title: '^test(\(\w+\))?: .*'
23+
24+
- label: 'build'
25+
matcher:
26+
title: '^(ci|build)(\(\w+\))?: .*'
27+
28+
- label: 'dependency'
29+
matcher:
30+
title: '^(deps)(\(\w+\))?: .*'
31+
32+
checks:
33+
- context: 'Semantic Pull Request'
34+
description:
35+
success: Ready for review & merge.
36+
failure: Missing semantic label for merge.
37+
labels:
38+
any:
39+
- enhancement
40+
- bug
41+
- refactor
42+
- documentation
43+
- test
44+
- build
45+
- dependency

.github/workflows/label.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/pr-triage.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Triage PR
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, synchronize, ready_for_review]
6+
branches: [master, main]
7+
8+
permissions:
9+
contents: read # the config file
10+
pull-requests: write # for labeling pull requests (on: pull_request_target or on: pull_request)
11+
statuses: write # to generate status
12+
checks: write # to generate status
13+
14+
jobs:
15+
labeler:
16+
name: Labeler
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: fuxingloh/multi-labeler@v4

0 commit comments

Comments
 (0)