From 93412f0d0dc2fa3bff4a7ca33681ac760b117575 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Tue, 26 May 2026 12:38:29 +0200 Subject: [PATCH 1/2] Add CI check against conventional commit messages Since we don't use conventional commit messages, it would be good to warn people about using them --- .../workflows/reject-conventional-commits.yml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/reject-conventional-commits.yml diff --git a/.github/workflows/reject-conventional-commits.yml b/.github/workflows/reject-conventional-commits.yml new file mode 100644 index 0000000000000..635983ffa9d51 --- /dev/null +++ b/.github/workflows/reject-conventional-commits.yml @@ -0,0 +1,39 @@ +name: Commit Style + +on: + pull_request: + branches: ["**"] + +permissions: {} + +jobs: + reject-conventional-commits: + runs-on: ubuntu-slim + permissions: + contents: read + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + fetch-depth: 25 + persist-credentials: false + + - name: Check commit titles + env: + BASE_SHA: ${{ github.event.pull_request.base.sha }} + HEAD_SHA: ${{ github.event.pull_request.head.sha }} + shell: bash + run: | + set -euo pipefail + pattern='^(feat|fix|chore|docs|style|refactor|perf|test|build|ci)(\([^)]*\))?!?:' + violations=() + while IFS= read -r title; do + if [[ "$title" =~ $pattern ]]; then + violations+=("$title") + fi + done < <(git log --format=%s "${BASE_SHA}..${HEAD_SHA}") + if (( ${#violations[@]} > 0 )); then + echo "Conventional commit prefixes are not allowed. Found:" + printf ' - %s\n' "${violations[@]}" + exit 1 + fi + echo "OK — no conventional commit prefixes found." From 796b4d5d5b602eac77c3ae30f59ee73baea1aff8 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Tue, 26 May 2026 19:59:04 +0200 Subject: [PATCH 2/2] Update reject-conventional-commits.yml Co-authored-by: Mike McQuaid --- .github/workflows/reject-conventional-commits.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reject-conventional-commits.yml b/.github/workflows/reject-conventional-commits.yml index 635983ffa9d51..2a8432784be4a 100644 --- a/.github/workflows/reject-conventional-commits.yml +++ b/.github/workflows/reject-conventional-commits.yml @@ -24,7 +24,7 @@ jobs: shell: bash run: | set -euo pipefail - pattern='^(feat|fix|chore|docs|style|refactor|perf|test|build|ci)(\([^)]*\))?!?:' + pattern='^(feat|fix|chore|refactor|perf|ci)(\([^)]*\))?!?:' violations=() while IFS= read -r title; do if [[ "$title" =~ $pattern ]]; then