File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed
Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "rules" : {
3+ "header-max-length" : [
4+ 2 ,
5+ " always" ,
6+ 72
7+ ],
8+ "type-enum" : [
9+ 2 ,
10+ " always" ,
11+ [
12+ " docs" ,
13+ " feat" ,
14+ " fix" ,
15+ " refactor" ,
16+ " revert" ,
17+ " style" ,
18+ " test"
19+ ]
20+ ],
21+ "type-empty" : [
22+ 2 ,
23+ " never"
24+ ]
25+ }
26+ }
Original file line number Diff line number Diff line change 1+ name : CI
2+ on : [push, pull_request]
3+ jobs :
4+ commitlint :
5+ runs-on : ubuntu-latest
6+ steps :
7+ - uses : actions/checkout@v3
8+ with :
9+ fetch-depth : 0
10+ - name : Install commitlint
11+ run : |
12+ npm install conventional-changelog-conventionalcommits
13+ npm install commitlint@latest
14+ - name : Print versions
15+ run : |
16+ git --version
17+ node --version
18+ npm --version
19+ npx commitlint --version
20+ - name : Validate current commit (last commit) with commitlint
21+ if : github.event_name == 'push'
22+ run : npx commitlint --from HEAD~1 --to HEAD --verbose
23+ - name : Validate PR commits with commitlint
24+ if : github.event_name == 'pull_request'
25+ run : npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
You can’t perform that action at this time.
0 commit comments