Skip to content

Commit 0bc2fcf

Browse files
committed
ci: added commit message linting
1 parent cac20fa commit 0bc2fcf

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/node.js.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Node.js CI
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
concurrency:
66
group: ci-${{ github.workflow }}-${{ github.ref }}
@@ -31,6 +31,14 @@ jobs:
3131
- name: Installing dependencies
3232
run: pnpm install --frozen-lockfile
3333

34+
- name: Linting last commit message
35+
if: github.event_name == 'push'
36+
run: pnpm exec commitlint --last --verbose
37+
38+
- name: Linting PR commit messages
39+
if: github.event_name == 'pull_request'
40+
run: pnpm exec commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
41+
3442
- name: Linting
3543
run: pnpm lint
3644

0 commit comments

Comments
 (0)