We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48cb4ab commit ef2e01cCopy full SHA for ef2e01c
1 file changed
.github/workflows/ci.yml
@@ -14,6 +14,23 @@ permissions:
14
contents: read
15
16
jobs:
17
+ conventional-pr-title:
18
+ if: github.event_name == 'pull_request'
19
+ runs-on: ubuntu-latest
20
+
21
+ steps:
22
+ - name: Validate pull request title
23
+ env:
24
+ PR_TITLE: ${{ github.event.pull_request.title }}
25
+ run: |
26
+ pattern='^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\([[:alnum:]_.-]+\))?(!)?: .+$'
27
28
+ if [[ ! "$PR_TITLE" =~ $pattern ]]; then
29
+ echo "PR title must follow Conventional Commits, for example: feat(ui): add route summary"
30
+ echo "Got: $PR_TITLE"
31
+ exit 1
32
+ fi
33
34
lint-and-test:
35
runs-on: ubuntu-latest
36
0 commit comments