forked from Light-it-labs/laravel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcaptainhook.json
70 lines (70 loc) · 2.66 KB
/
captainhook.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
"commit-msg": {
"enabled": true,
"actions": [
{
"action": "\\Webgriffe\\CaptainHook\\PreventCommitCaseSensitiveSameFilename"
},
{ "action": "\\Sojeda\\CaptainHook\\ValidateConventionalCommit" }
]
},
"pre-commit": {
"enabled": true,
"actions": [
{
"action": "echo 'Cannot push to master branch directly. Please use another branch.'; exit 1",
"options": {},
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\Branch\\On",
"args": ["master"]
}
]
},
{
"action": "echo 'Cannot push to main branch directly. Please use another branch.'; exit 1",
"options": {},
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\Branch\\On",
"args": ["main"]
}
]
},
{
"action": "echo 'Cannot push to develop branch directly. Please use another branch.'; exit 1",
"options": {},
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\Branch\\On",
"args": ["develop"]
}
]
},
{ "action": "composer run-script ecs:fix", "options": [] },
{ "action": "composer run-script rector:fix ", "options": [] },
{ "action": "npm run format:check", "options": [] },
{ "action": "npm run lint", "options": [] },
{ "action": "npm run spell-checker:staged", "options": [] }
]
},
"pre-push": {
"enabled": true,
"actions": [
{
"action": "\\CaptainHook\\App\\Hook\\Branch\\Action\\EnsureNaming",
"options": {
"regex": "#^(master|main|develop|staging|demo|(feature|test|(bug|hot)fix)(\\/[a-zA-Z0-9]+([-_][a-zA-Z0-9]+)*){1,2}|release\\/[0-9]+(\\.[0-9]+)*(-(alpha|beta|rc)[0-9]*)?)$#"
}
},
{
"action": "\\CaptainHook\\App\\Hook\\Composer\\Action\\CheckLockFile",
"options": []
},
{ "action": "composer run-script phpstan", "options": [] },
{ "action": "composer run-script rector", "options": [] },
{ "action": "composer run-script ecs", "options": [] },
{ "action": "vendor/bin/sail composer test" }
]
}
}