Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/workflows/commit-lint.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
on:
push:
branches:
- '*' # Runs on any push to any branch
- '*'
pull_request:
branches:
- '*' # Runs on any pull request targeting any branch
- '*'

name: Lint commits
permissions:
Expand All @@ -14,16 +14,20 @@ jobs:
lint-commits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fixup git permissions
shell: bash
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/setup-node@v4.1.0
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install commitlint dependencies
run: npm install --save-dev @commitlint/cli @commitlint/config-conventional
- name: Check commit messages
run: npx commitlint --from HEAD~${{ github.event.pull_request.commits || 1 }} --to HEAD
- name: Check commit messages (PR)
if: github.event_name == 'pull_request'
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
- name: Check commit message (push)
if: github.event_name == 'push'
run: npx commitlint --from HEAD~1 --to HEAD --verbose
Loading