File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -18,21 +18,31 @@ jobs:
18
18
name : Check commit message
19
19
runs-on : ubuntu-latest
20
20
steps :
21
+ - name : Checkout code
22
+ uses : actions/checkout@v4
23
+ with :
24
+ ref : ${{ github.event.pull_request.head.sha }}
21
25
- name : Check type prefix
22
26
uses : gsactions/commit-message-checker@v2
23
27
with :
24
28
pattern : ' ^(?:\[!!!\])?\[(BUILD|TASK|BUGFIX|FIX|FEATURE|DOC|CLEANUP|RELEASE){1}\] .+$'
25
29
flags : ' gm'
26
30
error : ' The first line needs to start with a commit type like "[BUGFIX]".'
31
+ excludeTitle : true
32
+ excludeDescription : true
27
33
- name : Check message format
28
- uses : gsactions/commit-message-checker@v1
34
+ uses : gsactions/commit-message-checker@v2
29
35
with :
30
36
pattern : ' ^(?:\[!!!\])?\[[A-Z]+\] [A-Z]+.+$'
31
37
flags : ' gm'
32
38
error : ' The actual message after the commit type should start with a uppercase letter.'
39
+ excludeTitle : true
40
+ excludeDescription : true
33
41
- name : Check line length
34
42
uses : gsactions/commit-message-checker@v2
35
43
with :
36
44
pattern : ' ^.{10,72}$'
37
45
flags : ' gm'
38
46
error : ' The maximum line length of 72 characters is exceeded.'
47
+ excludeTitle : true
48
+ excludeDescription : true
You can’t perform that action at this time.
0 commit comments