File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : commitlint
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+
9+ jobs :
10+ commitlint :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v4
15+ with :
16+ fetch-depth : 0
17+
18+ - name : Setup pnpm
19+ uses : pnpm/action-setup@v4
20+ with :
21+ version : " 9.5"
22+
23+ - name : Use Node.js 20
24+ uses : actions/setup-node@v4
25+ with :
26+ node-version : 20.x
27+ cache : " pnpm"
28+ cache-dependency-path : " **/pnpm-lock.yaml"
29+
30+ - name : Install dependencies
31+ run : pnpm install --frozen-lockfile
32+
33+ - name : Validate current commit (last commit) with commitlint
34+ if : github.event_name == 'push'
35+ run : npx commitlint --last --verbose
36+
37+ - name : Validate PR commits with commitlint
38+ if : github.event_name == 'pull_request'
39+ run : npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
Original file line number Diff line number Diff line change 1+ npx --no -- commitlint --edit "$1"
Original file line number Diff line number Diff line change 1+ module . exports = {
2+ extends : [ '@commitlint/config-conventional' ] ,
3+ rules : {
4+ 'subject-case' : [ 0 ] ,
5+ } ,
6+ } ;
Original file line number Diff line number Diff line change 1111 "author" : " " ,
1212 "license" : " ISC" ,
1313 "devDependencies" : {
14+ "@commitlint/cli" : " ^20.3.0" ,
15+ "@commitlint/config-conventional" : " ^20.3.0" ,
1416 "danger" : " ^12.3.3" ,
1517 "husky" : " ^9.1.4"
1618 },
You can’t perform that action at this time.
0 commit comments