From 41a7f2d85eec68eaf10f21d42997732863523297 Mon Sep 17 00:00:00 2001 From: Gabriel Pan Gantes Date: Tue, 26 May 2026 19:26:52 +0200 Subject: [PATCH] ci: enforce Conventional Commits format on PR titles The repo squash-merges PRs, so the PR title becomes the commit message on master that semantic-release reads to compute version bumps. Add a status check that rejects PRs whose title doesn't match Conventional Commits (feat/fix/perf/chore/docs/style/refactor/test/build/ci/revert, scope optional). To actually block merges, the "Validate Conventional Commits title" check must be added to master's branch protection as a required status check. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/pr-title.yml | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/pr-title.yml diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml new file mode 100644 index 0000000..a6f147f --- /dev/null +++ b/.github/workflows/pr-title.yml @@ -0,0 +1,36 @@ +name: PR title + +on: + pull_request: + types: + - opened + - edited + - reopened + - synchronize + branches: + - master + +jobs: + validate: + name: Validate Conventional Commits title + runs-on: ubuntu-latest + permissions: + pull-requests: read + steps: + - uses: amannn/action-semantic-pull-request@v6.1.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + feat + fix + perf + chore + docs + style + refactor + test + build + ci + revert + requireScope: false