We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2216070 commit 35dab4cCopy full SHA for 35dab4c
1 file changed
.github/workflows/pr_title.yml
@@ -0,0 +1,18 @@
1
+name: PR Title Enforcer
2
+on:
3
+ pull_request:
4
+ types: [opened, edited, reopened, synchronize]
5
+
6
+jobs:
7
+ validate-title:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - name: Validate PR Title
11
+ env:
12
+ PR_TITLE: ${{ github.event.pull_request.title }}
13
+ run: |
14
+ echo "Checking PR title: $PR_TITLE"
15
+ if [[ ! "$PR_TITLE" =~ ^(feat|fix|docs|style|refactor|improve|test|chore)\[[^]]+\]:\ .+ ]]; then
16
+ echo "::error::PR title must follow the format: 'type[scope]: description'"
17
+ exit 1
18
+ fi
0 commit comments