5 Commits

Author SHA1 Message Date
diesel
9cac229023 fix(hooks): use portable shebang for NixOS compatibility 2026-01-26 10:34:36 -08:00
mayor
b158ff27c2 fix(hooks): allow tag pushes in pre-push hook
Tags are used for releases and shouldn't be blocked by the branch
restriction that prevents feature branch pushes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 23:07:44 -08:00
aleiby
7016b33b39 fix(hooks): allow feature branches in contributor workflow (#850)
The pre-push hook now detects when an `upstream` remote is configured
and allows feature branches for the fork contribution workflow.

Previously, the hook blocked all non-main branches, which prevented
pushing PR branches to forks. Now the blocking logic checks for an
upstream remote - if present, it skips the block and allows the push.

The check wraps the blocking logic (rather than early-out) so that
any future additions to the hook will still apply to contributor
workflows.

Fixes #848

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 18:12:34 -08:00
gus
e0e6473556 fix: Allow polecat/* branches, remove hanoi test formulas
- Update pre-push hook to allow polecat/* branches (Refinery merges these)
- Remove towers-of-hanoi formulas (test fixtures, not production)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 23:31:40 -08:00
gus
ff670c5bd4 feat: Block internal PRs via pre-push hook and GitHub Action
Gas Town agents must push directly to main, not create PRs.
This adds defense-in-depth:

1. .githooks/pre-push - Blocks pushes to non-main branches locally
2. .github/workflows/block-internal-prs.yml - Auto-closes PRs from
   the same repo (forks/contributors can still create PRs)
3. internal/git/git.go - Auto-configures core.hooksPath on clone

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 23:28:11 -08:00