zhamao-framework/captainhook.json

48 lines
1.2 KiB
JSON
Raw Normal View History

2022-12-31 17:17:03 +08:00
{
"pre-push": {
"enabled": true,
"actions": [
{
"action": "composer analyse"
},
{
"action": "composer test"
}
]
},
"pre-commit": {
"enabled": true,
"actions": [
{
"action": "composer cs-fix -- {$STAGED_FILES|of-type:php} --dry-run",
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\OfType",
"args": ["php"]
}
]
}
]
},
"post-change": {
"enabled": true,
"actions": [
{
"action": "composer install",
"options": [],
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileChanged\\Any",
"args": [
[
"composer.json",
"composer.lock"
]
]
}
]
}
]
}
}