Repository navigation
Write down how a public repository is set up, ruleset first - #2
Merged
Merged
Conversation
Aligning sigrix-mcp, mullion and postern took a set of `gh` commands that were worth keeping: they applied, changed and verified the branch ruleset on four repositories. They lived only in a conversation. The next public repository should start from them rather than from memory. The ruleset gets most of the space because it is the one part of a repository's setup that no pull request reviews. It lives in settings; nothing notices when it drifts. docs/default-branch.ruleset.json is the canonical copy, identical to what sigrix-mcp runs, and docs/new-repository.md says why each rule is set the way it is. The non-obvious ones are the approvals: a sole maintainer can't satisfy code-owner review, the unattributed-changes approval or last-push approval, and every PR an agent opens is opened under that maintainer's account. The failure table is the part most likely to save time. Every row is a symptom that was actually hit: the classic-protection endpoint answering 404 for a repository protected by a ruleset, `blocked` with every check green, a POST stacking a second ruleset beside the first, a PUT quietly dropping a rule, a heredoc mangled on paste. The guide separates the commands that were run for real from the example filters, which were only checked against a copy of what the API returns. A no-clone variant that was never run was removed instead of being documented. The warning not to POST over an existing ruleset now comes before the POST commands. That ordering mistake is how mullion ended up with two rulesets. Documentation only: neither action changes, and consumers have nothing to bump. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WF6LAfT5nwL4wP9U9VmmAS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Aligning
sigrix-mcp,mullionandposterntook a set ofghcommands that were worth keeping: they applied, changed and verified the branch ruleset across four repositories. They only existed in a conversation. This writes them down, so the next public repository starts from them rather than from memory.docs/new-repository.md: the guide.docs/default-branch.ruleset.json: the canonical ruleset, identical to whatsigrix-mcpruns now.Why the ruleset gets most of the space
It's the one part of a repository's setup that no pull request reviews. Everything else is files, which go through PRs and get checked by CI. The ruleset lives in settings, and nothing notices when it drifts.
The guide says why each rule is set as it is. The approvals are the part that isn't obvious. A sole maintainer can't satisfy code-owner review, the unattributed-changes approval, or last-push approval. And every PR an agent opens is opened under that maintainer's account, so every one of them would be blocked. The guide also says to turn the first two back on once there's a second maintainer, since that's when they become the right rules.
What it covers
The "When something is off" table is the part most likely to save time. Every row is a symptom that actually came up: the classic-protection endpoint returning 404 for a repo protected by a ruleset,
blockedwith every check green, aPOSTstacking a second ruleset next to the first, aPUTsilently dropping a rule, a heredoc mangled on paste.Accuracy
postern's live ruleset.POSTover an existing ruleset now comes before thePOSTcommands. That ordering mistake is howmullionended up with two rulesets.Consumers
Documentation only. Neither action changes, so nothing pinned to
v1.0.0needs to move.This is also the first ordinary PR through
actions' corrected ruleset since the approval settings were fixed. Its commits are authored by an agent and it's opened under a maintainer's account, which is exactly the case that used to be blocked. It should reachcleanonceci-passedis green.🤖 Generated with Claude Code
https://claude.ai/code/session_01WF6LAfT5nwL4wP9U9VmmAS
Generated by Claude Code