Skip to content

Commit

Permalink
ci: automatically lint commit messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwebbio committed Jan 31, 2024
1 parent 6ba49d6 commit d1c4471
Show file tree
Hide file tree
Showing 4 changed files with 738 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .commitlintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
extends:
- '@commitlint/config-conventional'
19 changes: 19 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Lint Commits

on:
pull_request:

jobs:
lint-commits:
timeout-minutes: 10
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '18.x'
- run: yarn --immutable --immutable-cache
- run: yarn commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
},
"bin": "./dist/index.js",
"devDependencies": {
"@commitlint/config-conventional": "^18.6.0",
"@tsconfig/node18-strictest-esm": "^1.0.1",
"@types/jest": "^29.4.0",
"@types/luxon": "^3.2.0",
Expand All @@ -29,6 +30,7 @@
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.56.0",
"auto-changelog": "^2.4.0",
"commitlint": "^18.6.0",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.8.0",
"jest": "^29.4.1",
Expand Down
Loading

0 comments on commit d1c4471

Please sign in to comment.