-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (65 loc) · 2.65 KB
/
github-actions-commit-checker.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
name: Lint commit
on:
pull_request:
types: [opened, reopened, synchronize]
branches: [ "main" ]
push:
branches: [ "13.0.0.0" ]
jobs:
check-commit-message:
name: Check Commit Message
runs-on: ubuntu-latest
steps:
- name: Check Title Length
uses: gsactions/commit-message-checker@v1
with:
pattern: '^[^\n]{7,50}$'
error: '
The title is too long, 50 characters are just enough.
If you have more to say, put it at the message body.
For more explanations:
https://github.com/darakeon/dfm/blob/main/CONTRIBUTING.md
'
# For PR
excludeTitle: 'true' # PR title
excludeDescription: 'true' # PR description
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}
- name: Check Commit Scope
uses: gsactions/commit-message-checker@v1
with:
pattern: '^(core|auth|law|clip|admin|money|report|robot|outside|site|api|android|chore|version|docs|tests|tools|security|db|ci|mail|language|publish|accessibility|legal|midna|struct): .+'
error: '
The title of the commit message must have the format
"{scope}: {message in infinitive tense}".
The valid scopes are: `core`, `auth`, `law`, `clip`,
`admin`, `money`, `report`, `outside`, `attendant`,
`executor`, `robot`, `site`, `api`, `android`, `chore`,
`version`, `docs`, `tests`, `tools`, `security`, `db`,
`ci`, `mail`, `language`, `publish`, `accessibility`,
`legal`, `midna`, `struct`
For more explanations:
https://github.com/darakeon/dfm/blob/main/CONTRIBUTING.md
'
# For PR
excludeTitle: 'true' # PR title
excludeDescription: 'true' # PR description
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}
- name: Check Description Length
uses: gsactions/commit-message-checker@v1
with:
pattern: '^[^\n]{7,50}(?:\n(?:\n[^\n]{0,80})+)?$'
flags: g
error: '
The body can have a longer description than the subject,
but if you break it in lines with 80 characters,
it will be easier to read.
For more explanations:
https://github.com/darakeon/dfm/blob/main/CONTRIBUTING.md
'
# For PR
excludeTitle: 'true' # PR title
excludeDescription: 'true' # PR description
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}