mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 14:32:03 +00:00
CONTRIBUTING-AI.md pointed contributors at a CLAUDE.md "checked in and kept current"; that file is not in the repository, so the pointer and the twenty references to it in folder READMEs, docs and comments led nowhere. The note goes; its one lasting rule (whoever commits a change stands behind it, no real names, no live health figures, no secrets) moves into CONTRIBUTING.md. The folder READMEs keep their own content and drop the dead link, and a reference to the unpublished planning folder goes with it. The checked-in .mcp.json was a local editor config no workflow reads; it is untracked and ignored now. The translation tiers are described as machine-translated first drafts reviewed by the community, and the list names Russian, which it missed.
45 lines
1.9 KiB
YAML
45 lines
1.9 KiB
YAML
# Git-hook manager (v1.16.4). `pnpm install` wires the hooks via the
|
|
# `prepare` script in package.json; no manual step needed.
|
|
#
|
|
# Pre-commit secret scan: `gitleaks protect --staged` scans exactly the
|
|
# staged hunks against the repo's `.gitleaks.toml` before every commit,
|
|
# so a secret-shaped string never reaches the object store (where only
|
|
# a history rewrite can remove it again).
|
|
#
|
|
# Requirements: the `gitleaks` binary must be on PATH — the command
|
|
# below fails with install pointers when it is missing rather than
|
|
# silently skipping the scan.
|
|
#
|
|
# Opt-out (one commit): LEFTHOOK=0 git commit ...
|
|
# Opt-out (skip one job): LEFTHOOK_EXCLUDE=gitleaks git commit ...
|
|
# Opt-out (permanent): pnpm lefthook uninstall
|
|
# Per project policy (`--no-verify` is banned), prefer fixing the
|
|
# finding over bypassing the hook.
|
|
|
|
# Reject tool attribution trailers.
|
|
commit-msg:
|
|
commands:
|
|
no-tooling-trailer:
|
|
run: |
|
|
if grep -qiE '^(Co-Authored-By:.*(claude|anthropic|copilot|gpt|gemini)|Claude-Session:|Generated with)' "{1}"; then
|
|
echo "ERROR: the commit message carries a tooling co-author trailer or session link." >&2
|
|
echo "Project policy: commits are authored by the maintainer's git identity alone." >&2
|
|
echo "Remove the offending line(s) from the message and commit again." >&2
|
|
exit 1
|
|
fi
|
|
|
|
pre-commit:
|
|
commands:
|
|
gitleaks:
|
|
run: |
|
|
if ! command -v gitleaks >/dev/null 2>&1; then
|
|
echo "ERROR: gitleaks binary not found on PATH — the staged-secret scan cannot run." >&2
|
|
echo "Install it first, e.g.:" >&2
|
|
echo " brew install gitleaks # macOS" >&2
|
|
echo " apt/apk/pacman install gitleaks # Linux distros" >&2
|
|
echo " https://github.com/gitleaks/gitleaks#installing" >&2
|
|
echo "One-off bypass (use sparingly): LEFTHOOK=0 git commit ..." >&2
|
|
exit 1
|
|
fi
|
|
gitleaks protect --staged --redact --no-banner
|