Skip to content

chore(repo): adopt dev/main two-trunk branching model - #23

Merged
chriskehayias merged 1 commit into
devfrom
chore/branching-model
Sep 13, 2026
Merged

chore(repo): adopt dev/main two-trunk branching model#23
chriskehayias merged 1 commit into
devfrom
chore/branching-model

Conversation

@chriskehayias

Copy link
Copy Markdown
Contributor

Summary

Establishes the two-trunk flow: feature branches off dev, dev as staging, devmain as the production promotion.

feature/fix  --(squash PR)-->  dev  --(merge PR + tag)-->  main
                             staging              production

Changes in this PR

  • .github/workflows/test.yml — run tests on push/PR to dev as well as main. Previously main-only, which under the new flow would have left the staging trunk completely ungated.
  • CLAUDE.md — new Branching & Release section documenting the flow, protection rules, and hotfix path.
  • .claude/commands/release.md/release now promotes devmain via a merge-commit PR before tagging, and passes --target main explicitly (required now that dev is the default branch).

Repo-side config (already applied)

  • Default branch → dev
  • Squash + merge commit enabled, rebase disabled, auto-delete merged branches
  • Ruleset dev-staging: PR required, test must pass, squash-only, no force-push, no deletion
  • Ruleset main-production: PR required, test must pass, merge-commit-only, no force-push, no deletion

This PR is itself the first run through the new flow.

Establish `dev` as the integration/staging trunk and `main` as production.

- CI: run tests on push/PR to `dev` as well as `main`, so the `test` job can
  gate merges into the staging trunk (previously `main`-only, which under the
  new flow left `dev` entirely ungated).
- CLAUDE.md: document the branch-from-dev / squash-into-dev / merge-into-main
  flow, the protection rules, and the hotfix path.
- /release: promote `dev` -> `main` via a merge-commit PR before tagging, and
  always pass `--target main` explicitly now that `dev` is the default branch.

Paired with repo-side config: default branch `dev`, squash+merge only,
auto-delete merged branches, and active rulesets on both `dev` and `main`
(PR required, `test` required, no force-push, no deletion).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chriskehayias
chriskehayias merged commit ce34b44 into dev Sep 13, 2026
1 check passed
@chriskehayias
chriskehayias deleted the chore/branching-model branch September 13, 2026 10:31
@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

1 participant