Skip to content

Commit 56a230a

Browse files
committed
chore(project): update hooks
1 parent 1a7d7c0 commit 56a230a

21 files changed

Lines changed: 56 additions & 22 deletions

.pre-commit-config.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ repos:
1111
hooks:
1212
- id: trailing-whitespace
1313
# Skip generated trees and paths often checked in read-only (0444); mutating hooks must not touch them.
14-
exclude: (cdk/cdk\.out/|node_modules/|(^|/)LICENSE$|(^|/)\.gitattributes$|(^|/)\.npmignore$|(^|/)\.gitignore$|^cli/header\.js$|^docs/astro\.config\.mjs$|^docs/tsconfig\.json$|^docs/src/content\.config\.ts$|\.(snap|lock)$)
14+
exclude: (cdk/cdk\.out/|node_modules/|^docs/src/content/docs/.*\.md$|(^|/)LICENSE$|(^|/)\.gitattributes$|(^|/)\.npmignore$|(^|/)\.gitignore$|^cli/header\.js$|^docs/astro\.config\.mjs$|^docs/tsconfig\.json$|^docs/src/content\.config\.ts$|\.(snap|lock)$)
1515
- id: end-of-file-fixer
16-
exclude: (cdk/cdk\.out/|node_modules/|(^|/)LICENSE$|(^|/)\.gitattributes$|(^|/)\.npmignore$|(^|/)\.gitignore$|^cli/header\.js$|^docs/astro\.config\.mjs$|^docs/tsconfig\.json$|^docs/src/content\.config\.ts$)
16+
exclude: (cdk/cdk\.out/|node_modules/|^docs/src/content/docs/.*\.md$|(^|/)LICENSE$|(^|/)\.gitattributes$|(^|/)\.npmignore$|(^|/)\.gitignore$|^cli/header\.js$|^docs/astro\.config\.mjs$|^docs/tsconfig\.json$|^docs/src/content\.config\.ts$)
1717
- id: check-merge-conflict
1818
- id: check-yaml
1919
exclude: ^(cdk/cdk\.out/|cdk\.out/|node_modules/|agent/\.venv/)
@@ -65,7 +65,14 @@ repos:
6565

6666
- id: monorepo-security-pre-push
6767
name: security scans (pre-push)
68-
entry: bash -lc 'cd "$(git rev-parse --show-toplevel)" && mise run security'
68+
entry: bash -lc 'cd "$(git rev-parse --show-toplevel)" && mise run hooks:pre-push:security'
69+
language: system
70+
pass_filenames: false
71+
stages: [pre-push]
72+
73+
- id: monorepo-tests-pre-push
74+
name: package tests (pre-push)
75+
entry: bash -lc 'cd "$(git rev-parse --show-toplevel)" && mise run hooks:pre-push:tests'
6976
language: system
7077
pass_filenames: false
7178
stages: [pre-push]

CONTRIBUTING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ mise run hooks:install
6363
| Stage | What runs |
6464
|-------|-----------|
6565
| **pre-commit** | Trailing whitespace / EOF / merge-conflict / YAML+JSON checks; **gitleaks** on **staged** changes only; **eslint** (cdk, cli), **ruff** (agent), **astro check** (docs) when matching paths are touched. |
66-
| **pre-push** | **`mise run security`** — same as the root security task (gitleaks, OSV, Semgrep, Grype, Retire.js, agent Bandit + image scan when Docker is available). |
66+
| **pre-push** | Two pre-push hooks run in order:
67+
1. **`mise run hooks:pre-push:security`** — root security scans.
68+
2. **`mise run hooks:pre-push:tests`** — tests in `cdk`, `cli`, and `agent` packages.
69+
70+
For convenience, **`mise run hooks:pre-push`** runs both steps sequentially. |
6771

6872
Dry-run or reproduce locally without committing:
6973

docs/src/content/docs/developer-guide/Contributing.md

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/src/content/docs/developer-guide/Installation.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/src/content/docs/developer-guide/Introduction.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/src/content/docs/developer-guide/Project-structure.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/src/content/docs/developer-guide/Repository-preparation.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/src/content/docs/developer-guide/Where-to-make-changes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ Before editing, decide which part of the monorepo owns the behavior. This keeps
1212
| Agent runtime | `agent/` | Bundled into the image CDK deploys; run `mise run quality` in `agent/` or root build. |
1313
| Docs (source) | `docs/guides/`, `docs/design/` | After edits, run **`mise //docs:sync`** or **`mise //docs:build`**. Do not edit `docs/src/content/docs/` directly. |
1414

15-
For a concise duplicate of this table, common pitfalls, and a CDK test file map, see **[AGENTS.md](/design/agents)** at the repo root (oriented toward automation-assisted contributors).
15+
For a concise duplicate of this table, common pitfalls, and a CDK test file map, see **[AGENTS.md](/design/agents)** at the repo root (oriented toward automation-assisted contributors).

docs/src/content/docs/user-guide/Authentication.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/src/content/docs/user-guide/Introduction.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)