CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history
pre-push
Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.
| 2d2ea2c | 1 | #!/usr/bin/env bash |
| 2 | # ============================================================================ | |
| 3 | # GATETEST PRE-PUSH HOOK — PROTECTED INTEGRATION FILE | |
| 4 | # ============================================================================ | |
| 5 | # This hook blocks pushes from a protected platform (Crontech / Gluecron) to | |
| 6 | # their remotes if GateTest finds any error-severity issues. | |
| 7 | # | |
| 8 | # MUST NOT be removed, weakened, or bypassed without Craig's authorization. | |
| 9 | # See the GateTest Bible (CLAUDE.md) → "PROTECTED PLATFORMS" section. | |
| 10 | # Install location in target repo: .husky/pre-push (chmod +x) | |
| 11 | # Source of truth: https://github.com/ccantynz-alt/gatetest | |
| 12 | # /integrations/husky/pre-push | |
| 13 | # ============================================================================ | |
| 14 | set -e | |
| 15 | ||
| 16 | GATETEST_CACHE="${GATETEST_CACHE:-$HOME/.cache/gatetest}" | |
| 17 | ||
| 18 | if [ ! -d "$GATETEST_CACHE/.git" ]; then | |
| 19 | echo "[GateTest] Fetching latest GateTest into $GATETEST_CACHE ..." | |
| 20 | mkdir -p "$(dirname "$GATETEST_CACHE")" | |
| 21 | git clone --depth 1 https://github.com/ccantynz-alt/gatetest.git "$GATETEST_CACHE" | |
| 22 | else | |
| 23 | echo "[GateTest] Updating local cache ..." | |
| 24 | (cd "$GATETEST_CACHE" && git pull --ff-only --depth 1 origin HEAD >/dev/null 2>&1 || true) | |
| 25 | fi | |
| 26 | ||
| 27 | echo "[GateTest] Running quick diff-mode gate before push ..." | |
| 28 | node "$GATETEST_CACHE/bin/gatetest.js" --suite quick --diff --project "$(pwd)" |