From d158b0af6a609c73e1402916fc0c0d1d124ae8c5 Mon Sep 17 00:00:00 2001 From: Thomas Luizon Rodrigues Gregorio Date: Fri, 31 Jul 2026 01:06:16 -0300 Subject: [PATCH] ORB-164: forbid the admin merge in the repo conventions (J3 place 3) The prohibition already lives in AGENTS.md, which Codex reads. CLAUDE.md's Git workflow section is where a Claude session reads the absolute git rules, and it carried squash-merge-only without the admin-merge rule beside it. Names both raw API calls, not only the CLI flag: forbidding `gh pr merge --admin` alone leaves the REST and GraphQL merge paths open, which is the bypass shape ORB-163 exists to close. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Bojq5cLFZ87iBD8zhnoSWH --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 4d557456..893a4dfb 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -55,7 +55,7 @@ The workflow is tool-agnostic between Claude Code and opencode; `.claude/` stays ## Git workflow -Branch protection on `main`: no direct pushes, no force pushes, no branch deletion. Branches: `feature/xxx`, `fix/xxx`, `chore/xxx`. **Squash merge only.** Never reuse a branch after its PR is squash-merged. +Branch protection on `main`: no direct pushes, no force pushes, no branch deletion. Branches: `feature/xxx`, `fix/xxx`, `chore/xxx`. **Squash merge only.** Never reuse a branch after its PR is squash-merged. Never `--no-verify`/`--no-gpg-sign`. **Never perform an admin merge in any shape**: no `gh pr merge --admin`, no direct `PUT /repos/{owner}/{repo}/pulls/{number}/merge`, and no direct GraphQL `mergePullRequest` mutation. Naming the two raw API calls is deliberate; forbidding only the CLI flag leaves both API paths open. The admin override is Thomas's alone: if a merge genuinely needs one, STOP and ask him to merge it himself. Pre-commit hook: a git-level `pre-commit` (lefthook, `lefthook.yml`) runs `dotnet format Orbit.slnx --include ` on staged `.cs` files and re-stages the fixes. This repo has no Node, so there is no auto-install — bootstrap once per machine with `winget install evilmartians.lefthook` (fallbacks: `scoop install lefthook`, or a GitHub-release binary + `lefthook self-update`), then run `lefthook install` inside the clone to write `.git/hooks/pre-commit`.