File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ name : PR title format
2+ on :
3+ pull_request :
4+ types :
5+ - opened
6+ - reopened
7+ - edited
8+ - synchronize
9+
10+ concurrency :
11+ group : ${{ github.workflow }}-${{ github.ref }}
12+ cancel-in-progress : true
13+
14+ jobs :
15+ check :
16+ name : conventional-pr-title:required
17+ runs-on : ubuntu-latest
18+ steps :
19+ # Conventional commit patterns:
20+ # verb: description
21+ # verb!: description of breaking change
22+ # verb(scope): Description of change to $scope
23+ # verb(scope)!: Description of breaking change to $scope
24+ # verb: feat, fix, ...
25+ # scope: refers to the part of code being changed. E.g. " (accounts)" or " (accounts,canisters)"
26+ # !: Indicates that the PR contains a breaking change.
27+ - env :
28+ TITLE : ${{ github.event.pull_request.title }}
29+ run : |
30+ echo "PR title: $TITLE"
31+ if [[ "$TITLE" =~ ^(feat|fix|chore|build|ci|docs|style|refactor|perf|test)(\([-a-zA-Z0-9,]+\))?\!?\: ]]; then
32+ echo pass
33+ else
34+ echo "PR title does not match conventions"
35+ exit 1
36+ fi
You can’t perform that action at this time.
0 commit comments