Skip to content

Commit e7c3a25

Browse files
committed
ci: Replace outdated commitlint action
Use the commitlint npm package directly instead as recommended at: https://commitlint.js.org/guides/ci-setup.html
1 parent d376d8b commit e7c3a25

2 files changed

Lines changed: 10 additions & 21 deletions

File tree

.github/workflows/commitlint.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/github-ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
steps:
2020

2121
- uses: actions/checkout@v6
22+
with:
23+
fetch-depth: 0
2224

2325
- name: Setup Node.js
2426
uses: actions/setup-node@v6
@@ -56,6 +58,14 @@ jobs:
5658
- name: Perform ESLint check
5759
run: npm run lint
5860

61+
- name: Validate current commit (last commit) with commitlint
62+
if: github.event_name == 'push'
63+
run: npm run lint:commit -- --last --verbose
64+
65+
- name: Validate PR commits with commitlint
66+
if: github.event_name == 'pull_request'
67+
run: npm run lint:commit -- --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
68+
5969
- name: Perform Licenses check
6070
run: npm run check-licenses
6171

0 commit comments

Comments
 (0)