Skip to content

Commit

Permalink
build: Enforce commit message (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeboer authored May 27, 2024
1 parent d9531c8 commit 49858ec
Show file tree
Hide file tree
Showing 5 changed files with 832 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
steps:
- run: echo "Job was automatically triggered by a ${{ github.event_name }} event on ${{ github.ref }} - ${{ github.repository }}."
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand All @@ -30,6 +32,7 @@ jobs:
- name: Install dependencies
run: npm install
- run: npm run lint
- run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
- name: Build
run: npm run compile
- name: LDWorkbench init & test run
Expand Down
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 49858ec

Please sign in to comment.