Skip to content

Commit

Permalink
add logic
Browse files Browse the repository at this point in the history
  • Loading branch information
tatomyr committed Dec 18, 2024
1 parent 2548c7c commit d517c85
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit d517c85

Please sign in to comment.