-
Notifications
You must be signed in to change notification settings - Fork 13
76 lines (72 loc) · 1.92 KB
/
pr_labeling.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
name: PR Labeling
"on":
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize
- unlabeled
jobs:
# Check that conventional commit messages are used in the title of the PR
pr_title_check:
name: Check the PR title to be compliant with conventional commits
permissions:
statuses: write
runs-on: ubuntu-latest
steps:
- uses: aslafy-z/conventional-pr-title-action@v3
with:
preset: conventional-changelog-conventionalcommits@5.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Autogenerate labels based on the PR title
pr_auto_labeling: # ToDo: Needs refactoring as far as v6 is released. See https://github.com/release-drafter/release-drafter/issues/1216
name: Automatically label the PR
permissions:
pull-requests: write
runs-on: ubuntu-latest
needs:
- pr_title_check
steps:
- uses: release-drafter/release-drafter@v6
with:
disable-releaser: true
config-name: pr_autolabeling_config.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pr_label_check:
name: Check that the PR is labled.
permissions:
pull-requests: read
checks: write
runs-on: ubuntu-latest
needs:
- pr_auto_labeling
steps:
- uses: danielchabr/pr-labels-checker@v3.3
with:
hasSome: "\
breaking,\
bug,\
build,\
ci,\
dependencies,\
documentation,\
duplicate,\
enhancement,\
good first issue,\
help wanted,\
invalid,\
performance,\
question,\
refactoring,\
removal,\
style,\
security,\
testing,\
wontfix,\
skip-changelog,\
"
githubToken: ${{ secrets.GITHUB_TOKEN }}