-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcaptainhook.json
More file actions
85 lines (85 loc) · 1.85 KB
/
captainhook.json
File metadata and controls
85 lines (85 loc) · 1.85 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{
"commit-msg": {
"enabled": true,
"actions": [
{
"//": "Make sure that commit messages follow conventional commit rules.",
"action": "\\Ramsey\\CaptainHook\\ValidateConventionalCommit",
"options": {
"config": {
"typeCase": null,
"types": [],
"scopeCase": null,
"scopeRequired": false,
"scopes": [],
"descriptionCase": null,
"descriptionEndMark": null,
"bodyRequired": false,
"bodyWrapWidth": null,
"requiredFooters": []
}
}
}
]
},
"pre-push": {
"enabled": false,
"actions": []
},
"pre-commit": {
"enabled": true,
"actions": [
{
"//": "Lint and fix all staged files.",
"action": "composer lint {$STAGED_FILES|of-type:php}"
},
{
"//": "Add changed files back to the git stage.",
"action": "git add {$STAGED_FILES|of-type:php}"
},
{
"//": "Static Analysis of all PHP files in the project.",
"action": "composer analyse"
},
{
"//": "Run PHPUnit tests.",
"action": "composer test"
}
]
},
"prepare-commit-msg": {
"enabled": false,
"actions": []
},
"post-commit": {
"enabled": false,
"actions": []
},
"post-merge": {
"enabled": false,
"actions": []
},
"post-checkout": {
"enabled": false,
"actions": []
},
"post-rewrite": {
"enabled": false,
"actions": []
},
"post-change": {
"enabled": true,
"actions": [
{
"action": "composer install",
"options": {},
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileChanged\\Any",
"args": [["composer.json", "composer.lock"]]
}
]
}
]
}
}