Skip to content

Commit 0d90f58

Browse files
ci(commits): Enforce conventionalcommit format
1 parent 874644b commit 0d90f58

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

.commitlintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

.github/workflows/pr-linting.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,23 @@ jobs:
1313
uses: actions/checkout@v4
1414

1515
- name: MegaLinter
16-
uses: oxsecurity/megalinter/flavors/documentation@v9
16+
uses: oxsecurity/megalinter/flavors/documentation@v9
17+
18+
commitlint:
19+
runs-on: ubuntu-latest
20+
name: Conventional Commit Validation
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Setup node
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: 20
31+
32+
- name: Validate PR commits with commitlint
33+
run: |
34+
npm install --no-save @commitlint/cli @commitlint/config-conventional
35+
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

0 commit comments

Comments
 (0)