-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathlefthook.yml
More file actions
65 lines (64 loc) · 2.08 KB
/
Copy pathlefthook.yml
File metadata and controls
65 lines (64 loc) · 2.08 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
pre-commit:
output: true
commands:
json-validity:
glob: "**/*.json"
run: |
if ! command -v node >/dev/null 2>&1; then
echo "❌ node not available; cannot validate JSON"
exit 1
fi
node scripts/validate-json.mjs {files}
yaml-validity:
glob: "**/*.{yml,yaml}"
exclude:
- "plugins/*/skills/*/assets/**"
run: |
if ! command -v node >/dev/null 2>&1; then
echo "❌ node not available; cannot validate YAML"
exit 1
fi
node scripts/validate-yaml.mjs {files}
skill-frontmatter:
glob: "plugins/*/skills/*/SKILL.md"
run: |
for f in {files}; do
[ -f "$f" ] || continue
if ! head -10 "$f" | grep -q "^name:"; then
echo "❌ missing 'name:' frontmatter: $f"
exit 1
fi
if ! head -10 "$f" | grep -q "^description:"; then
echo "❌ missing 'description:' frontmatter: $f"
exit 1
fi
done
summarize-plugin-catalogs:
run: |
[ -d plugins ] || exit 0
if ! command -v node >/dev/null 2>&1; then
echo "ℹ️ node not available; skipping summarize-plugin-catalogs"
exit 0
fi
for plugin in plugins/*/; do
name=$(basename "$plugin")
node scripts/summarize-markdown.js "$plugin" "${plugin}CATALOG.md" \
--depth=4 \
--fields=description,argument-hint \
--title="$name catalog" \
--tagline="Auto-generated index of skills, agents, references and assets shipped by the \`$name\` plugin." \
>/dev/null
git add "${plugin}CATALOG.md" 2>/dev/null || true
done
sync-readme-counts:
run: |
if ! command -v node >/dev/null 2>&1; then
echo "ℹ️ node not available; skipping sync-readme-counts"
exit 0
fi
node scripts/sync-readme-counts.mjs >/dev/null
git add README.md 2>/dev/null || true
commit-msg:
commands:
commitlint:
run: pnpm exec commitlint --edit {1}