Unifying canary and Canary branches
Status: Planned maintainer migration (not automated by branch policy).
Why: Two branch names exist today:
| Branch | Used by |
|---|---|
canary (lowercase) |
build.yml, release.yml, codeql.yml, repo-mirror.yml, branch policy sync |
Canary (capital C) |
canary.yml (standalone Canary Release workflow) |
Policy treats both as downstream lines. Contributors and CI can target the wrong ref. Unification removes duplicate configuration and sync PRs.
Preconditions
- [ ] Agree on the canonical name (recommended:
canarylowercase, matching mirror andrelease.yml). - [ ] Confirm which branch on GitHub actually receives day-to-day pushes today.
- [ ] Schedule a quiet window (no active release in flight).
Migration checklist (canonical = canary)
1. GitHub
- If
Canaryhas commits not oncanary, merge or fast-forward:git fetch origin canary Canary git checkout canary git merge origin/Canary # resolve conflicts if any git push origin canary - Update default branch protection / rulesets if they reference
Canary. - Delete remote branch
Canaryafter verification:git push origin --delete Canary
2. Workflows
- Change canary.yml:
on.push.branches:Canary→canary- Security verify branch:
refs/heads/Canary→refs/heads/canary checkoutref:Canary→canary
- Search repo for
Canarybranch references (README badges, changelog links). - Remove
Canaryfrom .github/branch-policy.jsondownstreamBranchesandlongLivedHeadBranchesonce the branch is deleted.
3. Branch policy and sync
- After deletion, only
canaryremains insyncGithubFromMasterTargets(already listed). - Re-run Sync .github from master if needed.
4. External systems
- repo-mirror.yml already mirrors
canary. - Update any fork docs, Discord runbooks, or NuGet release notes that link to
/tree/Canary.
5. Verify
- [ ] Push to
canarytriggersbuild.ymlandrelease.ymljobs. - [ ] Retire or repoint standalone
canary.ymlifrelease.ymlrelease-canaryjob fully replaces it. - [ ] No open PRs use
Canaryas head or base.
Rollback
Recreate Canary from canary tip and revert workflow edits if a release window requires the old setup.