Skip to content

feat(skill): setup-repo respects release state when setting GitHub default branch#85

Merged
amcheste merged 2 commits into
developfrom
feat/setup-repo-release-aware
May 12, 2026
Merged

feat(skill): setup-repo respects release state when setting GitHub default branch#85
amcheste merged 2 commits into
developfrom
feat/setup-repo-release-aware

Conversation

@amcheste-ai-agent
Copy link
Copy Markdown
Contributor

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-repo previously 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:

  • 0 releases → set GitHub default to `develop` (current behavior, correct for new repos)
  • 1+ releases → leave GitHub default unchanged (preserves `main` for repos that already shipped)

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):

  • golf-coach-agent — 0 releases → default=develop
  • market-lens — 0 releases → default=develop (CODEOWNERS missing, needs follow-up PR)
  • pokemon-red-ai — 0 releases → default=develop
  • repo-template — 1 release → default=main (kept)

This PR makes the skill itself correct for the next invocation.

…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-ai-agent amcheste-ai-agent Bot requested a review from amcheste as a code owner May 12, 2026 02:10
@amcheste amcheste merged commit 213c47d into develop May 12, 2026
7 checks passed
@amcheste amcheste deleted the feat/setup-repo-release-aware branch May 12, 2026 03:01
@amcheste-ai-agent amcheste-ai-agent Bot mentioned this pull request May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants