From 5719f6a4b3654f608091e32290d9fcfbc7e38062 Mon Sep 17 00:00:00 2001 From: dev Date: Fri, 25 Sep 2026 16:26:42 +0200 Subject: [PATCH] Run the local gate from a versioned pre-push hook The Gitea server has no Actions, so scripts/check.sh is the gate. A versioned .githooks/pre-push runs it; CONTRIBUTING explains how to enable it per clone and when it may be skipped. Co-Authored-By: Claude Fable 5.1 --- .githooks/pre-push | 7 +++++++ CONTRIBUTING.md | 11 +++++++++++ 2 files changed, 18 insertions(+) create mode 100755 .githooks/pre-push diff --git a/.githooks/pre-push b/.githooks/pre-push new file mode 100755 index 0000000..1730c57 --- /dev/null +++ b/.githooks/pre-push @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# Versioned pre-push hook. The server runs no CI, so the local gate runs here. +# Enable once per clone: git config core.hooksPath .githooks +# Skip only deliberately: git push --no-verify +set -euo pipefail +cd "$(git rev-parse --show-toplevel)" +exec scripts/check.sh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 042f05e..18b0611 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,6 +37,17 @@ dependencies are not accepted without prior discussion. ## Tests +The server runs no CI. The gate is `scripts/check.sh`, run by the versioned +`pre-push` hook once you enable it in your clone: + +```bash +git config core.hooksPath .githooks +``` + +Skip it only deliberately with `git push --no-verify`, and say why in the +commit message. The workflows in `.gitea/workflows` are ready for a Gitea 1.21 +or later with a runner; until then they do not run. + ```bash ./scripts/check.sh # everything ci.yml runs, on any machine; run before pushing go test -race ./...