File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : ' Check Commit Message'
2
+
3
+ on :
4
+ pull_request :
5
+ types :
6
+ - opened
7
+ - edited
8
+ - reopened
9
+ - synchronize
10
+ branches :
11
+ - ' main'
12
+
13
+ jobs :
14
+ check-commit-messages :
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - name : ' Check commit messages format'
18
+ uses : gsactions/commit-message-checker@v2
19
+ with :
20
+ pattern : ' ^[^!]+: [A-Za-z]+.+ .+$'
21
+ flags : ' gm'
22
+ error : ' Commit subject line must match the following pattern: <scope>: <description>'
23
+ excludeTitle : ' false'
24
+ excludeDescription : ' true'
25
+ checkAllCommitMessages : ' true'
26
+ accessToken : ${{ secrets.GITHUB_TOKEN }}
27
+ - name : ' Check commit messages length'
28
+ uses : gsactions/commit-message-checker@v2
29
+ with :
30
+ pattern : ' ^[^#].{10,80}$'
31
+ error : ' Commit subject line maximum line length of 80 characters is exceeded.'
32
+ excludeTitle : ' false'
33
+ excludeDescription : ' true'
34
+ checkAllCommitMessages : ' true'
35
+ accessToken : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments