File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : ' Commit Message Check'
2
+ on :
3
+ pull_request :
4
+ types :
5
+ - opened
6
+ - edited
7
+ - reopened
8
+ - synchronize
9
+ pull_request_target :
10
+ types :
11
+ - opened
12
+ - edited
13
+ - reopened
14
+ - synchronize
15
+ push :
16
+ branches :
17
+ - main
18
+ - ' releases/*'
19
+
20
+ jobs :
21
+ check-commit-message :
22
+ name : Check Commit Message
23
+ runs-on : ubuntu-latest
24
+ steps :
25
+ - name : Check Commit Type
26
+ uses : gsactions/commit-message-checker@v1
27
+ with :
28
+ pattern : ' \[[^]]+\] .+$'
29
+ flags : ' gm'
30
+ error : ' Your first line has to contain a commit type like "[BUGFIX]".'
31
+ excludeTitle : ' true' # optional: this excludes the title of a pull request
32
+
33
+ - name : Check Line Length
34
+ uses : gsactions/commit-message-checker@v1
35
+ with :
36
+ pattern : ' ^[^#].{74}'
37
+ error : ' The maximum line length of 74 characters is exceeded.'
38
+ excludeDescription : ' false' # optional: this excludes the description body of a pull request
39
+ excludeTitle : ' true' # optional: this excludes the title of a pull request
40
+ checkAllCommitMessages : ' false' # optional: this checks all commits associated with a pull request
41
+ # accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true
You can’t perform that action at this time.
0 commit comments