Skip to content

Commit

Permalink
feat: add pull request check
Browse files Browse the repository at this point in the history
  • Loading branch information
Norton-Lin committed Nov 18, 2024
1 parent 6808c72 commit a8ad4fe
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/prcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Pull Request Title Check

on:
pull_request:
branches:
- main
- dev

jobs:
pr-title-check:
runs-on: ubuntu-latest
steps:
- name: Check pull request title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
if ! echo "$PR_TITLE" | grep -Eq "^(feat|fix|docs|style|refactor|test|chore): .+"; then
echo "❌ Pull request title does not follow the conventional format (e.g., 'feat: description')"
exit 1
fi

0 comments on commit a8ad4fe

Please sign in to comment.