Skip to content

Commit

Permalink
chore: check all commit messages
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidTanner committed Oct 17, 2023
1 parent 56ff54c commit f21c929
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ name: Pull Request Build & Test
on: pull_request

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm i
- run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
main:
runs-on: ubuntu-latest
steps:
Expand All @@ -12,4 +23,3 @@ jobs:
node-version: 18.x
- run: npm i
- run: npm test
- run: npx semantic-release --dry-run --branches ${{ github.head_ref || github.ref_name }}
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
5 changes: 5 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
extends: [
'@commitlint/config-conventional',
],
};
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"url": "https://github.com/DavidTanner/nodecredstash.git"
},
"devDependencies": {
"@commitlint/cli": "^17.8.0",
"@commitlint/config-conventional": "^17.8.0",
"@types/debug": "^4.1.9",
"@types/node": "^18.18.5",
"@typescript-eslint/eslint-plugin": "^6.7.5",
Expand All @@ -46,6 +48,7 @@
"eslint-plugin-jest": "^27.4.2",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.2",
"husky": "^8.0.3",
"typescript": "^5.2.2",
"vitest": "^0.34.6"
},
Expand Down

0 comments on commit f21c929

Please sign in to comment.