You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@magpie.apache.org by po...@apache.org on 2026/09/13 18:21:42 UTC
(magpie-site) 01/01: docs: tell contributors to run prek install
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch docs/prek-install
in repository https://gitbox.apache.org/repos/asf/magpie-site.git
commit 229c80c7929978348a3548579bd9d0509e350874
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sun Sep 13 20:21:26 2026 +0200
docs: tell contributors to run prek install
The lint job runs `prek run --all-files`, but nothing told a contributor
to put that same gate in front of their own commits, so the hooks only
ever ran after a push. Two hygiene failures reached main that way.
Note the global-hooksPath case: with `core.hooksPath` set, git ignores
this repo's `.git/hooks/` and plain `prek install` refuses rather than
installing something git would never read.
Generated-by: Claude Opus 5
Claude-Session: https://claude.ai/code/session_01C4rtzQ7PiuAjxrPcXCW2eh
---
AGENTS.md | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/AGENTS.md b/AGENTS.md
index 5cea9b9..597bdc8 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -58,6 +58,14 @@ continue with the original task.
## Local setup
- `npm install` — install dependencies.
+- `prek install` — install the pre-commit hooks. The lint job runs
+ `prek run --all-files`, so this puts the same gate in front of every commit;
+ without it, hygiene failures (a missing trailing newline, a JSX
+ whitespace-collapse) are only caught after the push. If you have a global
+ `core.hooksPath`, git ignores this repo's `.git/hooks/` and plain
+ `prek install` refuses — install with
+ `prek install --force --git-dir "$(git rev-parse --git-common-dir)"`, and
+ check that the global hook chains through to the repo-local one.
- `npm run dev` — local dev server. **Always start the dev server this way.**
It runs `scripts/dev.sh`, which sets `ASTRO_TELEMETRY_DISABLED=1` before
launching `astro dev`. Do **not** invoke `astro dev` / `npx astro dev`