File tree Expand file tree Collapse file tree 2 files changed +84
-0
lines changed
Expand file tree Collapse file tree 2 files changed +84
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "extends" : [
3+ " @commitlint/config-conventional"
4+ ],
5+ "rules" : {
6+ "type-enum" : [
7+ 2 ,
8+ " always" ,
9+ [
10+ " feat" ,
11+ " fix" ,
12+ " docs" ,
13+ " style" ,
14+ " refactor" ,
15+ " perf" ,
16+ " test" ,
17+ " build" ,
18+ " ci" ,
19+ " chore" ,
20+ " revert"
21+ ]
22+ ],
23+ "type-case" : [
24+ 2 ,
25+ " always" ,
26+ " lower-case"
27+ ],
28+ "type-empty" : [
29+ 2 ,
30+ " never"
31+ ],
32+ "scope-case" : [
33+ 2 ,
34+ " always" ,
35+ " lower-case"
36+ ],
37+ "subject-empty" : [
38+ 2 ,
39+ " never"
40+ ],
41+ "subject-full-stop" : [
42+ 2 ,
43+ " never" ,
44+ " ."
45+ ],
46+ "header-max-length" : [
47+ 2 ,
48+ " always" ,
49+ 100
50+ ]
51+ }
52+ }
Original file line number Diff line number Diff line change 1+ name : Title Check
2+
3+ on :
4+ pull_request :
5+ types :
6+ - opened
7+ - edited
8+ - synchronize
9+ - reopened
10+
11+ jobs :
12+ title-check :
13+ name : Title Check
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout repo
17+ uses : actions/checkout@v4
18+
19+ - name : Setup Node.js
20+ uses : actions/setup-node@v4
21+ with :
22+ node-version : " 20"
23+
24+ - name : Install commitlint
25+ run : |
26+ npm install --save-dev @commitlint/config-conventional @commitlint/cli
27+
28+ - name : Validate PR title
29+ env :
30+ PR_TITLE : ${{ github.event.pull_request.title }}
31+ run : |
32+ echo "$PR_TITLE" | npx commitlint -g .github/.commitlintrc.json
You can’t perform that action at this time.
0 commit comments