Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/pr-title-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: PR Title Check

on:
pull_request:
types: [opened, edited, synchronize, reopened]

jobs:
check-title:
runs-on: ubuntu-latest
steps:
- name: Check PR title follows conventional commits
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
PATTERN='^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?(!)?: .{1,}'
if [[ ! "$PR_TITLE" =~ $PATTERN ]]; then
echo "::error::PR title does not follow conventional commits format."
echo ""
echo "Expected: <type>(<scope>): <description>"
echo "Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert"
echo ""
echo "Examples:"
echo " feat: add new routing recipe"
echo " fix(implement): correct config-plumbing verify step"
echo " docs: update README with install instructions"
exit 1
fi
echo "PR title is valid: $PR_TITLE"