From 874644b0f7b99fa834c6ffe593b73f45f08d0497 Mon Sep 17 00:00:00 2001 From: Chris Mitchell Date: Tue, 24 Feb 2026 15:18:24 +1300 Subject: [PATCH 1/5] ci(commits): Use conventionalcommits format for analysing the commit --- .github/workflows/create-github-release.yml | 2 +- .releaserc | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create-github-release.yml b/.github/workflows/create-github-release.yml index fb196be99..668d04d7c 100644 --- a/.github/workflows/create-github-release.yml +++ b/.github/workflows/create-github-release.yml @@ -31,6 +31,6 @@ jobs: node-version: 20 - name: Perform release - run: npx --package @semantic-release/exec semantic-release + run: npx --package @semantic-release/exec --package conventional-changelog-conventionalcommits semantic-release env: GH_TOKEN: ${{ steps.get_access_token.outputs.token }} diff --git a/.releaserc b/.releaserc index 225c1daaf..8410a5510 100644 --- a/.releaserc +++ b/.releaserc @@ -21,6 +21,11 @@ } ], "@semantic-release/github", - "@semantic-release/commit-analyzer" + [ + "@semantic-release/commit-analyzer", + { + "preset": "conventionalcommits" + } + ] ] } From 0d90f58d9c8ec730e6d146c328b274c8554f7f3c Mon Sep 17 00:00:00 2001 From: Chris Mitchell Date: Tue, 24 Feb 2026 15:18:55 +1300 Subject: [PATCH 2/5] ci(commits): Enforce conventionalcommit format --- .commitlintrc.json | 3 +++ .github/workflows/pr-linting.yml | 21 ++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .commitlintrc.json diff --git a/.commitlintrc.json b/.commitlintrc.json new file mode 100644 index 000000000..c30e5a970 --- /dev/null +++ b/.commitlintrc.json @@ -0,0 +1,3 @@ +{ + "extends": ["@commitlint/config-conventional"] +} diff --git a/.github/workflows/pr-linting.yml b/.github/workflows/pr-linting.yml index c175b8031..4a3472307 100644 --- a/.github/workflows/pr-linting.yml +++ b/.github/workflows/pr-linting.yml @@ -13,4 +13,23 @@ jobs: uses: actions/checkout@v4 - name: MegaLinter - uses: oxsecurity/megalinter/flavors/documentation@v9 \ No newline at end of file + uses: oxsecurity/megalinter/flavors/documentation@v9 + + commitlint: + runs-on: ubuntu-latest + name: Conventional Commit Validation + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Validate PR commits with commitlint + run: | + npm install --no-save @commitlint/cli @commitlint/config-conventional + npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose \ No newline at end of file From 6a2d64abc1107b835c94f22520ca0733a8fc2cb5 Mon Sep 17 00:00:00 2001 From: Chris Mitchell Date: Tue, 24 Feb 2026 15:25:49 +1300 Subject: [PATCH 3/5] ci(commits): Allow capitalised subjects --- .commitlintrc.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.commitlintrc.json b/.commitlintrc.json index c30e5a970..d2572e133 100644 --- a/.commitlintrc.json +++ b/.commitlintrc.json @@ -1,3 +1,6 @@ { - "extends": ["@commitlint/config-conventional"] + "extends": ["@commitlint/config-conventional"], + "rules": { + "subject-case": [0] + } } From ddb6bea83fc37fd8886727cff3d9737fd32c3558 Mon Sep 17 00:00:00 2001 From: Chris Mitchell Date: Tue, 24 Feb 2026 15:28:03 +1300 Subject: [PATCH 4/5] ci(commits): limit permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .github/workflows/pr-linting.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr-linting.yml b/.github/workflows/pr-linting.yml index 4a3472307..a77e04755 100644 --- a/.github/workflows/pr-linting.yml +++ b/.github/workflows/pr-linting.yml @@ -1,5 +1,8 @@ name: PR Linting +permissions: + contents: read + on: pull_request: types: [opened, reopened, synchronize] From b8ece7444d2f03eb9aafff2772ecae5c9146763b Mon Sep 17 00:00:00 2001 From: Chris Mitchell Date: Tue, 24 Feb 2026 15:30:24 +1300 Subject: [PATCH 5/5] ci(commits): allow longer body --- .commitlintrc.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.commitlintrc.json b/.commitlintrc.json index d2572e133..4467c7516 100644 --- a/.commitlintrc.json +++ b/.commitlintrc.json @@ -1,6 +1,7 @@ { "extends": ["@commitlint/config-conventional"], "rules": { - "subject-case": [0] + "subject-case": [0], + "body-max-line-length": [0] } }