forked from EpamLifeSciencesTeam/cmwl_pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (63 loc) · 2.29 KB
/
PR_info_check.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
name: 'PR Info Check'
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
jobs:
check-commit-message:
name: Check Commit Message
runs-on: ubuntu-latest
steps:
- name: Check Commit Type
uses: gsactions/commit-message-checker@v1
with:
pattern: '^(feat|fix|docs|style|refactor|test|chore): .*$'
error: 'Commit message first line must contain one of the following commit types: feat, fix, docs, style, refactor, test, chore.'
flags: 's'
excludeDescription: 'true'
excludeTitle: 'true'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}
- name: Check Commit First Word Capitalization
uses: gsactions/commit-message-checker@v1
with:
pattern: '^[^:]+: [A-Z].*$'
flags: 's'
error: 'Commit message must start with a capital letter.'
excludeDescription: 'true'
excludeTitle: 'true'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}
- name: Check Commit First Line End
uses: gsactions/commit-message-checker@v1
with:
pattern: '^[^\n]+[^.\n](\n.+)*$'
flags: 's'
error: 'Commit message first line must not end with a period.'
excludeDescription: 'true'
excludeTitle: 'true'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}
- name: Check Commit Multiline Separator
uses: gsactions/commit-message-checker@v1
with:
pattern: '^[^\n]+(\n(\n[^\n]+)+)?$'
error: 'Commit header and body must be separated by one blank line'
flags: 'g'
excludeDescription: 'true'
excludeTitle: 'true'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}
- name: Check Commit Line Length
uses: gsactions/commit-message-checker@v1
with:
pattern: '^[^:]+: [^\n]{0,50}(\n[^\n]{0,72})*$'
error: 'The maximum line length of 50 (72) characters is exceeded.'
flags: 'g'
excludeDescription: 'true'
excludeTitle: 'true'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}