diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml index 023113b4cb..ad9f63178e 100644 --- a/.github/workflows/pr-title.yml +++ b/.github/workflows/pr-title.yml @@ -12,5 +12,13 @@ jobs: env: PR_TITLE: ${{ github.event.pull_request.title }} run: | - echo TEST - echo "$PR_TITLE" + if ! echo "$PR_TITLE" | grep -E "^(fix|feat|chore|docs)(\([a-z-]+\))?: (🔖 )?[a-z].+[^.]$"; then + echo "❌ PR title '$PR_TITLE' does not match the required format" + echo "Required format: type(scope): subject" + echo "Examples:" + echo " feat: add new feature" + echo " fix(core): fix bug" + echo " docs: update README" + exit 1 + fi + echo "✅ PR title format is valid"