From 8fa3453a258cca9450fef9d2b93acf5fd65bdd16 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 2 Feb 2026 19:15:26 +0100 Subject: [PATCH 1/3] chore: optimize the Conventional Commit Linter workflow --- .github/workflows/commitlint.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 64af26e3..b5d9f922 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -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 From b68c9b189c27fa0c6c31681e5000cdb35df7e433 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 4 Feb 2026 01:36:23 +0100 Subject: [PATCH 2/3] Update .github/workflows/commitlint.yml --- .github/workflows/commitlint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index b5d9f922..95c7d853 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -11,7 +11,7 @@ permissions: jobs: commitlint: - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - name: Compute number of commits to fetch id: nb-of-commits From 092d09326ae2b513ff91eba4cc23bcc47010933b Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 4 Feb 2026 16:52:17 +0100 Subject: [PATCH 3/3] revert runner change --- .github/workflows/commitlint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 95c7d853..b5d9f922 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -11,7 +11,7 @@ permissions: jobs: commitlint: - runs-on: ubuntu-slim + runs-on: ubuntu-latest steps: - name: Compute number of commits to fetch id: nb-of-commits