-
Notifications
You must be signed in to change notification settings - Fork 166
/
Copy pathcaptainhook.json
97 lines (97 loc) · 2.09 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{
"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"]
}
},
{
"run": "pnpm i --frozen-lockfile"
},
{
"run": "py/bin/generate_schema_typing"
},
{
"run": "bin/fmt"
},
{
"run": "py/bin/run_python_tests"
},
{
"run": "uv run --directory py mkdocs build"
},
{
"run": "py/bin/build_dists"
},
{
"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"
},
{
"run": "bin/fmt"
},
{
"run": "py/bin/run_python_tests"
},
{
"run": "uv run --directory py mkdocs build"
},
{
"run": "py/bin/build_dists"
},
{
"run": "bin/run_go_tests"
},
{
"run": ".hooks/commit-message-format-pre-push"
}
]
}
}
}