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>
This commit is contained in:
@@ -1,29 +1,30 @@
|
||||
#!/bin/bash
|
||||
# Block pushes to non-main branches from internal clones
|
||||
# External contributors use forks, so this only affects Gas Town agents
|
||||
# Block PRs by preventing pushes to arbitrary feature branches.
|
||||
# Gas Town agents push to main (crew) or polecat/* branches (polecats).
|
||||
# PRs are for external contributors only.
|
||||
|
||||
# Allow: main, beads-sync
|
||||
# Block: feature branches, polecat/* branches, etc.
|
||||
# Allowed patterns:
|
||||
# main, beads-sync - Direct work branches
|
||||
# polecat/* - Polecat working branches (Refinery merges these)
|
||||
|
||||
while read local_ref local_sha remote_ref remote_sha; do
|
||||
branch="${remote_ref#refs/heads/}"
|
||||
|
||||
case "$branch" in
|
||||
main|beads-sync)
|
||||
main|beads-sync|polecat/*)
|
||||
# Allowed branches
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: Gas Town agents push directly to main."
|
||||
echo "ERROR: Invalid branch for Gas Town agents."
|
||||
echo ""
|
||||
echo "Blocked push to: $branch"
|
||||
echo ""
|
||||
echo "If you're working on a fix:"
|
||||
echo " git checkout main"
|
||||
echo " git merge $branch"
|
||||
echo " git push origin main"
|
||||
echo " git branch -d $branch"
|
||||
echo "Allowed branches:"
|
||||
echo " main - Crew workers push here directly"
|
||||
echo " polecat/* - Polecat working branches"
|
||||
echo " beads-sync - Beads synchronization"
|
||||
echo ""
|
||||
echo "See CLAUDE.md: 'Crew workers push directly to main. No feature branches.'"
|
||||
echo "Do NOT create PRs. Push to main or let Refinery merge polecat work."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user