chore: add pr title validation to ci (#3702)

## Summary
- Adds a `pr-title` CI job that validates PR titles start with `feat:`,
`fix:`, `test:`, `chore:`, or `showcase:` and are all lowercase
- Updates `.github/CONTRIBUTING.md` with the title format rules and a
link to the full contributing docs

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bartek Iwańczuk
2026-03-27 09:11:51 +01:00
committed by GitHub
co-authored by Claude Opus 4.6
parent bc13417448
commit 7aea4942d7
2 changed files with 34 additions and 2 deletions
+17
View File
@@ -7,6 +7,23 @@ on:
branches: [main]
jobs:
pr-title:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Validate PR title
env:
TITLE: ${{ github.event.pull_request.title }}
run: |
if ! echo "$TITLE" | grep -qP '^(feat|fix|test|chore|ci):'; then
echo "::error::PR title must start with feat:, fix:, test:, chore:, or ci:"
exit 1
fi
if echo "$TITLE" | grep -qP '[A-Z]'; then
echo "::error::PR title must be all lowercase"
exit 1
fi
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 10