feat(skill): setup-repo respects release state when setting GitHub default branch#85
Merged
Merged
Conversation
…fault branch Companion to amcheste/engineering-handbook#19 (branch-model clarification) and #84 in this repo (publish-release default flip). The branch model distinguishes two concepts that share the word "default": 1. Integration trunk (always develop — where work integrates) 2. GitHub's "default branch" repo setting (UX pointer: landing page, git clone target, PR-base UI default) Under the new rule, the GitHub setting is develop only until the first release, then flips to main. setup-repo previously set it to develop unconditionally, which is wrong for a repo that already has releases (e.g. running setup-repo against a pre-existing repo that just hasn't been protected yet). Update Step 2 to check release count: develop if zero, kept as-is if one or more. Integration trunk (Step 1, create develop) is unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-Authored-By: amcheste <13696614+amcheste@users.noreply.github.com>
amcheste
approved these changes
May 12, 2026
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.
Companion PR to engineering-handbook#19 (branch-model clarification) and #84 (publish-release default flip). Completes the family-wide alignment on the new rule.
What this does
Step 2 of
/setup-repopreviously set the GitHub default branch to `develop` unconditionally. That's wrong for a repo with existing releases — under the new rule, GitHub default should be `develop` only pre-release and `main` post-release.Updated Step 2 to check release count:
Integration trunk (Step 1, create develop branch) is unchanged.
Already applied manually
The 4 repos that needed this skill run got it manually (with the new rule baked in):
This PR makes the skill itself correct for the next invocation.