Skip to content

feat(skill): publish-release flips GitHub default to main on first release#84

Merged
amcheste merged 2 commits into
developfrom
feat/publish-release-default-flip
May 12, 2026
Merged

feat(skill): publish-release flips GitHub default to main on first release#84
amcheste merged 2 commits into
developfrom
feat/publish-release-default-flip

Conversation

@amcheste-ai-agent
Copy link
Copy Markdown
Contributor

Implements Step 5 of the release ceremony documented in engineering-handbook#19.

What this does

Adds a new Step 5 to claude-skills/publish-release/SKILL.md. After the tag pushes and the pipeline starts, the skill ensures GitHub's default branch setting is `main`:

```bash
current=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')
if [ "$current" != "main" ]; then
gh repo edit --default-branch main
fi
```

  • On the first release: flips develop → main. The repo landing page now shows the shipped product instead of the integration trunk.
  • On every subsequent release: no-op. The check is idempotent.

The integration trunk is unaffected — contributors still branch from and PR to develop. Only GitHub's separate "default branch" repo setting (which controls the landing page, git clone target, and PR-base UI default) changes.

Why this is in the skill, not a workflow

Two alternatives were considered:

  • GitHub Actions workflow firing on release: requires a token with Administration: Read & Write (the default GITHUB_TOKEN can't change repo settings). Every consuming repo would need a secret configured.
  • Skill step (this PR): uses the bot's existing GH App token. No per-repo secrets. The release flow is already canonical (CLAUDE.md forbids GitHub-UI release merges), so this skill is the only path releases take.

Skill step is simpler, no secrets to rotate, and the behavior lives next to the rest of the release flow.

Companion PRs

  • engineering-handbook#19 — handbook docs that name the integration-trunk vs GitHub-default-branch distinction.
  • Manual gh repo edit --default-branch main on the 6 repos currently in the intermediate state (have releases, but default still points at develop): assets, cam-brand, engineering-handbook, niche-hunter, overleaf-mcp, overleaf-mcp-site.

…lease

Implements Step 5 of the release ceremony documented in
engineering-handbook PR #19. The integration trunk stays on develop;
this only touches GitHub's separate "default branch" repo setting,
which controls the landing page, clone target, and PR-base UI default.

After the tag pushes and the pipeline starts, check the current
default. If it's still develop (first release), flip to main. If it's
already main (subsequent release), no-op. The check is idempotent so
the skill can run it unconditionally without risk.

Contributors keep branching from and PRing to develop — only the
repo's public-facing default changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: amcheste <13696614+amcheste@users.noreply.github.com>
@amcheste amcheste merged commit 5c95ad1 into develop May 12, 2026
7 checks passed
@amcheste amcheste deleted the feat/publish-release-default-flip branch May 12, 2026 02:26
@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