captainhook.json•2.4 kB
{
"config": {
"git-directory": ".git"
},
"hooks": {
"commit-msg": {
"actions": [
{
"run": ".hooks/conventional-commit-msg {$MESSAGE_FILE}"
}
]
},
"pre-commit": {
"actions": [
{
"run": ".hooks/no-commits-on-branches main"
},
{
"run": "CaptainHook::File.MaxSize",
"config": {
"allow-failure": true
},
"options": {
"max-size": "1M"
}
},
{
"run": "CaptainHook::File.BlockSecrets",
"options": {
"presets": ["Aws", "GitHub", "Stripe", "Google"],
"allowed": ["AIDAQEAAAAAAAAA"]
}
},
{
"run": "pnpm i --frozen-lockfile"
},
{
"run": "py/bin/generate_schema_typing --ci"
},
{
"run": "bin/fmt"
},
{
"run": "py/bin/run_python_tests_with_tox p"
},
{
"run": "echo 'disabled' || uv run --directory py mkdocs build"
},
{
"run": "py/bin/build_dists"
},
{
"run": "uv run --directory py liccheck"
},
{
"run": "bin/run_go_tests"
}
]
},
"pre-push": {
"actions": [
{
"run": "CaptainHook::Branch.PreventPushOfFixupAndSquashCommits",
"options": {
"branches-to-protect": ["main"]
}
},
{
"run": "CaptainHook::Branch.EnsureNaming",
"options": {
"regex": "^main|[a-z_][0-9a-z_]+-(build|chore|ci|docs|feat|fix|perf|refactor|revert|release|style|test)-[a-z][0-9a-z_]+-?([A-Za-z0-9a_-])*$"
}
},
{
"run": "pnpm i --frozen-lockfile"
},
{
"run": "py/bin/generate_schema_typing --ci"
},
{
"run": "bin/fmt"
},
{
"run": "py/bin/run_python_tests_with_tox p"
},
{
"run": "echo 'disabled' || uv run --directory py mkdocs build"
},
{
"run": "py/bin/build_dists"
},
{
"run": "uv run --directory py liccheck"
},
{
"run": "bin/run_go_tests"
},
{
"run": ".hooks/commit-message-format-pre-push"
}
]
}
}
}