Repository navigation
Expand file tree
/
Copy pathlefthook.yml
More file actions
61 lines (60 loc) · 3.3 KB
/
Copy pathlefthook.yml
File metadata and controls
61 lines (60 loc) · 3.3 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
post-checkout:
commands:
configure-git:
run: git config blame.ignoreRevsFile .git-blame-ignore-revs
pre-commit:
parallel: true
jobs:
- name: build-bundles
# Keep the committed bundles in sync with the sources; stage_fixed would only re-add the
# staged src files, so the freshly built bundles are staged explicitly. Each runs from the repo
# root and names its bundle by the full path: from a git worktree, an add run inside a
# subfolder stages the path as if that subfolder were the root. One job per server keeps a
# commit inside its release unit, and the group is piped as two parallel `git add`s would race
# for the index lock.
group:
piped: true
jobs:
- name: build-gameface
glob: "plugins/coherent-gameface/mcp/src/*.ts"
run: mise build:gameface && git add plugins/coherent-gameface/mcp/dist/server.mjs
- name: build-cs2-dev
glob: "plugins/cs2-modding/mcp/src/*.ts"
run: mise build:cs2-dev && git add plugins/cs2-modding/mcp/dist/server.mjs plugins/cs2-modding/mcp/dist/monitor.mjs
commands:
dotnet-test:
# The unity-devtools server ships as a NuGet dotnet tool (no committed artifact); staged C#
# changes just need to compile and pass the offline test suite.
# A glob LIST, not one nested-brace pattern: lefthook's matcher silently matches nothing
# when brace alternations nest (verified), and `**/` alone would miss the flat top-level
# sources because it requires an intermediate directory.
glob:
- "plugins/unity-devtools/{mcp,sdb,tests,tests-integration}/*.{cs,csproj}"
- "plugins/unity-devtools/{mcp,sdb,tests,tests-integration}/**/*.{cs,csproj}"
run: dotnet test agents-plugins.slnx
tsc:
# Several projects hold the repository's TypeScript and each has its own type environment, so a
# staged file anywhere runs the task that knows them all rather than one tsc over one of them.
glob: "*.{ts,tsx,js,json}"
run: mise check:tsc
plugin-sync:
# The Claude and Codex plugin manifests duplicate shared metadata; keep them in sync.
glob: "{package.json,.claude-plugin/*.json,plugins/*/package.json,plugins/*/.claude-plugin/*.json,plugins/*/.codex-plugin/*.json,plugins/*/.mcp.json,scripts/check-plugin-sync.ts}"
run: mise exec bun -- bun scripts/check-plugin-sync.ts
skill-content:
# Agent-facing prose is a deliverable with no other automated coverage; the check reads every
# file it judges, so any staged file among them triggers a full pass. Any staged Markdown
# triggers it, since the line-cite scope is Markdown alone; the other globs mirror the
# check's non-Markdown roots (the skills trees and the server's markers): widen both.
glob:
- "*.md"
- "plugins/*/skills/**/*"
- "plugins/cs2-modding/mcp/src/*.ts"
- "scripts/check-skill-content.ts"
run: mise exec bun -- bun scripts/check-skill-content.ts
oxlint:
glob: "*.{ts,tsx,js,jsx,mjs,cjs}"
run: mise exec bun -- bun --bun oxlint --deny-warnings --no-error-on-unmatched-pattern {staged_files}
oxfmt:
glob: "*.{ts,tsx,js,jsx,mjs,cjs,json,jsonc,md}"
run: mise exec bun -- bun --bun oxfmt --check --no-error-on-unmatched-pattern {staged_files}