Skip to content
Open
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
17 changes: 15 additions & 2 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,24 @@ on:
- main
pull_request:

permissions:
contents: read

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Compute number of commits to fetch
id: nb-of-commits
# `+ 1` for PRs because of the merge commit
run: |
echo "toParse=$(echo "$EVENT" | jq -r 'if .commits then (.commits | length) else (.pull_request.commits + 1) end')" >> $GITHUB_OUTPUT
env:
EVENT: ${{ toJSON(github.event) }}
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 100
persist-credentials: false
sparse-checkout: .
fetch-depth: ${{ steps.nb-of-commits.outputs.toParse }}
- uses: wagoid/commitlint-github-action@v6
Loading