From c89c29fd79a6328f9263b18387ed3bce9bcc1cde Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 2 Feb 2026 19:10:01 +0100 Subject: [PATCH 1/2] chore: enforce conventional commit messages --- .github/workflows/commitlint.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/commitlint.yml diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml new file mode 100644 index 0000000..c8de256 --- /dev/null +++ b/.github/workflows/commitlint.yml @@ -0,0 +1,29 @@ +name: Conventional Commit Linter + +on: + push: + branches: + - main + pull_request: + +permissions: + contents: read + +jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - name: Compute number of commits in the PR + 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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + persist-credentials: false + sparse-checkout: . + fetch-depth: ${{ steps.nb-of-commits.outputs.toParse }} + - uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6.2.1 From 1cc86c5a0c771bf23883a208652661f27b0415d3 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 2 Feb 2026 19:12:54 +0100 Subject: [PATCH 2/2] fixup! chore: enforce conventional commit messages --- .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 c8de256..4ccfb64 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -13,7 +13,7 @@ jobs: commitlint: runs-on: ubuntu-latest steps: - - name: Compute number of commits in the PR + - name: Compute number of commits to fetch id: nb-of-commits # `+ 1` for PRs because of the merge commit run: |