Skip to content

Commit

Permalink
ci: add commit messages linting GitHub Action (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
fharper committed Mar 7, 2023
1 parent 137958c commit 0ed987f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .commitlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parserPreset": "conventional-changelog-conventionalcommits",
"rules": {
"header-max-length": [2, "always", 72]
}
}
18 changes: 18 additions & 0 deletions .github/workflows/check-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Check Commit Messages
on: push

jobs:
commitlint:
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@main
with:
fetch-depth: 0

- name: Lint the commits
uses: wagoid/commitlint-github-action@v5
with:
configFile: .commitlint.json
failOnWarnings: true

0 comments on commit 0ed987f

Please sign in to comment.