Skip to content

Commit

Permalink
build: Enforce commit message (#1268)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeboer committed Mar 18, 2024
1 parent dd3200a commit 164a049
Show file tree
Hide file tree
Showing 5 changed files with 1,125 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: lts/*
- run: npm ci
- run: npm run check
- run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
- run: npm test
- run: npm run compile
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit $1
7 changes: 7 additions & 0 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default {
extends: ['@commitlint/config-conventional'],
rules: {
'body-max-line-length': [2, 'always', 150],
'subject-case': [2, 'always', ['sentence-case', 'lower-case']],
},
};
Loading

0 comments on commit 164a049

Please sign in to comment.