mirror of
https://github.com/coder/coder.git
synced 2026-06-03 13:08:25 +00:00
e96cd5cbb2
## Summary - remove the `pre-push` git hook script from the repository - remove the `make pre-push` target and related Makefile documentation - update contributor and agent docs so they only describe the remaining `pre-commit` hook ## Validation - `make pre-commit` - `git diff --check` --- _Generated with [`mux`](https://github.com/coder/mux) • Model: `openai:gpt-5.4` • Thinking: `high`_
23 lines
646 B
Bash
Executable File
23 lines
646 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Pre-commit hook that runs CI-equivalent checks locally.
|
|
# Runs `make pre-commit` (gen, fmt, lint, typos, build) which
|
|
# catches most CI failures without needing Docker or Playwright.
|
|
#
|
|
# Installation (worktree-compatible):
|
|
#
|
|
# git config core.hooksPath scripts/githooks
|
|
#
|
|
# Bypass: git commit --no-verify
|
|
|
|
set -euo pipefail
|
|
|
|
cd "$(git rev-parse --show-toplevel)"
|
|
unset GIT_DIR
|
|
|
|
# In linked worktrees, set worktree-scoped hooksPath to override shared config.
|
|
if [[ "$(git rev-parse --git-dir)" != "$(git rev-parse --git-common-dir)" ]]; then
|
|
git config --worktree core.hooksPath scripts/githooks
|
|
fi
|
|
exec make pre-commit
|