We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54bc377 commit b5243a3Copy full SHA for b5243a3
.github/workflows/pr-title.yml
@@ -0,0 +1,24 @@
1
+name: PR Title Check
2
+
3
+on:
4
+ pull_request:
5
+ types: [opened, edited, synchronize, reopened]
6
7
+jobs:
8
+ check-pr-title:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Check PR title
12
+ env:
13
+ PR_TITLE: ${{ github.event.pull_request.title }}
14
+ run: |
15
+ if ! echo "$PR_TITLE" | grep -E "^(fix|feat|chore|docs)(\([a-z-]+\))?: (🔖 )?[a-z].+[^.]$"; then
16
+ echo "❌ PR title '$PR_TITLE' does not match the required format"
17
+ echo "Required format: type(scope): subject"
18
+ echo "Examples:"
19
+ echo " feat: add new feature"
20
+ echo " fix(core): fix bug"
21
+ echo " docs: update README"
22
+ exit 1
23
+ fi
24
+ echo "✅ PR title format is valid"
0 commit comments