Skip to content

Commit 6cc80d1

Browse files
committed
chore: add commitlint (#4915)
1 parent 5ef1d61 commit 6cc80d1

File tree

2 files changed

+104
-0
lines changed

2 files changed

+104
-0
lines changed

.commitlintrc

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"parserPreset": "conventional-changelog-conventionalcommits",
3+
"rules": {
4+
"scope-enum": [
5+
2,
6+
"always",
7+
[
8+
"symfony",
9+
"doctrine",
10+
"metadata",
11+
"elasticsearch",
12+
"mongodb",
13+
"jsonld",
14+
"hydra",
15+
"jsonapi",
16+
"graphql",
17+
"openapi",
18+
"serializer",
19+
"jsonschema",
20+
"validation"
21+
]
22+
],
23+
"scope-empty": [
24+
1,
25+
"always"
26+
],
27+
"body-leading-blank": [
28+
1,
29+
"always"
30+
],
31+
"body-max-line-length": [
32+
2,
33+
"always",
34+
100
35+
],
36+
"footer-leading-blank": [
37+
1,
38+
"always"
39+
],
40+
"footer-max-line-length": [
41+
2,
42+
"always",
43+
100
44+
],
45+
"header-max-length": [
46+
2,
47+
"always",
48+
100
49+
],
50+
"subject-case": [
51+
2,
52+
"never",
53+
[
54+
"sentence-case",
55+
"start-case",
56+
"pascal-case",
57+
"upper-case"
58+
]
59+
],
60+
"subject-empty": [
61+
2,
62+
"never"
63+
],
64+
"subject-full-stop": [
65+
2,
66+
"never",
67+
"."
68+
],
69+
"type-case": [
70+
2,
71+
"always",
72+
"lower-case"
73+
],
74+
"type-empty": [
75+
2,
76+
"never"
77+
],
78+
"type-enum": [
79+
2,
80+
"always",
81+
[
82+
"build",
83+
"chore",
84+
"ci",
85+
"docs",
86+
"feat",
87+
"fix",
88+
"perf",
89+
"refactor",
90+
"revert",
91+
"style",
92+
"test"
93+
]
94+
]
95+
}
96+
}

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ env:
1010
SYMFONY_DEPRECATIONS_HELPER: max[self]=0
1111

1212
jobs:
13+
commitlint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
configFile: .commitlintrc
20+
- uses: wagoid/commitlint-github-action@v5
1321
php-cs-fixer:
1422
name: PHP-cs-fixer (PHP ${{ matrix.php }})
1523
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)