Skip to content

chore(deps): bump peter-evans/create-pull-request from 7.0.5 to 7.0.6 #35

chore(deps): bump peter-evans/create-pull-request from 7.0.5 to 7.0.6

chore(deps): bump peter-evans/create-pull-request from 7.0.5 to 7.0.6 #35

name: PR Title Validation
on:
pull_request:
types: [opened, edited, synchronize, reopened]
jobs:
validate-pr-title:
name: '✅ Validate PR Title'
runs-on: ubuntu-latest
steps:
- name: Check PR Title
run: |
PR_TITLE="${{ github.event.pull_request.title }}"
PATTERN="^(([Ff]eat|[Ff]ix|[Dd]ocs|[Ss]tyle|[Rr]efactor|[Tt]est|[Cc]hore|[Bb]uild|[Cc]i|[Pp]erf)(\(.+\))?: .+|dependabot.*)$"
if ! echo "$PR_TITLE" | grep -qE "$PATTERN"; then
echo "❌ ERROR: Invalid PR title format"
echo ""
echo "Got PR title: $PR_TITLE"
echo ""
echo "PR titles must:"
echo "1. Start with one of these prefixes (case-insensitive first letter):"
echo " - feat / Feat (for new features)"
echo " - fix / Fix (for bug fixes)"
echo " - docs / Docs (for documentation)"
echo " - style / Style (for formatting)"
echo " - refactor / Refactor (for code restructuring)"
echo " - test / Test (for adding tests)"
echo " - chore / Chore (for maintenance)"
echo " - build / Build (for build system)"
echo " - ci / CI (for CI/CD)"
echo " - perf / Perf (for performance)"
echo ""
echo "2. Optionally include a scope in parentheses after the type"
echo ""
echo "3. Include a description after a colon and space"
echo ""
echo "Examples:"
echo "✅ feat: add new resource"
echo "✅ feat(api): add new endpoint"
echo "✅ fix: resolve connection timeout"
echo "✅ fix(database): fix query performance"
echo "✅ dependabot: bump lodash from 4.17.20 to 4.17.21"
exit 1
fi
echo "✅ PR title '$PR_TITLE' follows the conventional commit format and is compatible with the release-please"