-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (52 loc) · 1.93 KB
/
pr-lint.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
name: PR title conformance
on:
pull_request_target:
types:
- opened
- edited
- synchronize
jobs:
lint-pr:
runs-on: ubuntu-latest
steps:
- name: Lint PR
uses: amannn/action-semantic-pull-request@v5
with:
types: |
build
ci
docs
feat
fix
perf
refactor
style
test
chore
requireScope: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Comment for PR title conformance
if: failure()
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{tojson(github.event.number)}}
body: |
Please ensure your PR conforms to conventional commits (see https://www.conventionalcommits.org).
Commits MUST be prefixed with a type, which consists of one of the following:
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
* **docs**: Documentation only changes
* **feat**: A new feature
* **fix**: A bug fix
* **perf**: A code change that improves performance
* **refactor**: A code change that neither fixes a bug nor adds a feature
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
* **test**: Adding missing tests or correcting existing tests
* **chore**: No production code change
- name: Add label to PR
if: github.actor != 'dependabot[bot]'
uses: fuxingloh/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
config-path: .github/labeler.yml