Skip to content

docs(branching): add branching strategy and update CONTRIBUTING#208

Open
parth0025 wants to merge 1 commit into
stagingfrom
docs/branching-strategy
Open

docs(branching): add branching strategy and update CONTRIBUTING#208
parth0025 wants to merge 1 commit into
stagingfrom
docs/branching-strategy

Conversation

@parth0025
Copy link
Copy Markdown
Collaborator

Summary

Adds BRANCHING.md β€” a comprehensive branching-strategy doc that captures AlianHub's two-branch model (main + staging) and aligns CONTRIBUTING.md with reality (it previously told contributors to branch off main, but we've been branching off staging all along).

Step 2 of the open-source repo maintenance baseline initiative (Step 1 β€” license relicense to AGPL-3.0).

Why this matters

Right now, a new contributor reading CONTRIBUTING.md would create a branch off main and open a PR against main. That PR would either be wildly out of date (staging is 235 commits ahead) or rejected. This PR fixes that gap and gives contributors a single source of truth for branch conventions.

Files changed (3)

File Change
BRANCHING.md (new, 327 lines) Two-branch model, 11 topic-branch types, PR/hotfix/release workflows, protected branch rules, gh-api setup commands, cheatsheet, FAQ
CONTRIBUTING.md Fixed base branch (main β†’ staging), updated branch naming examples to Conventional-Commits style (feature/ β†’ feat/, etc.), added link to BRANCHING.md
.claude/REFERENCES.md Added BRANCHING.md to the Contributing & Community docs index

The model (captured, not invented)

main (stable, releases only)  ◄── promoted from staging at release time
  β–²
staging (active dev)  ◄── all topic-branch PRs land here
  β–²
feat|fix|chore|... topic branches  ◄── branch off staging, PR back to staging

hotfix/* branches from main, PR to main, backport to staging
release/v* branches from staging, PR to main, tag

Model choices documented (reviewers β€” push back if any feel wrong)

Choice Set to
Reviews required on main PRs 1 approval
Merge style on main Linear history (squash or rebase)
Reviewer requirement on staging PRs 0 (maintainer self-merge OK)
Promotion cadence On-demand (typically every 1–4 weeks)
Conventional Commits in PR titles Required
Hotfix backport method Cherry-pick to staging

⚠️ Important β€” what this PR does NOT do

Branch protection rules are documented but NOT yet applied to GitHub. The ready-to-run gh api commands are in BRANCHING.md Β§ How to enable branch protection.

We will run those commands after this PR merges β€” applying them now would block the very PR that introduces them.

Test plan

  • BRANCHING.md renders correctly on GitHub (tables, mermaid-like ASCII flow, code blocks)
  • Internal anchor links in BRANCHING.md (#topic-branches, #how-to-enable-branch-protection-one-time-setup) work
  • CONTRIBUTING.md no longer mentions main as the base branch
  • Link from CONTRIBUTING.md β†’ BRANCHING.md works
  • Link from .claude/REFERENCES.md β†’ BRANCHING.md works

After merge

  1. Run the gh api branch-protection commands from BRANCHING.md (admin-only)
  2. Verify protections show up in repo Settings β†’ Branches
  3. Move on to step 3 β€” PR & branch name formats (templates, commitlint)

πŸ€– Generated with Claude Code

- New BRANCHING.md documenting the two-branch model (main + staging),
  11 topic-branch types, PR/hotfix/release workflows, protected
  branch rules, and ready-to-run gh api commands for enabling them
- Fix CONTRIBUTING.md base branch (main -> staging) and update branch
  naming examples to Conventional-Commits style
- Add BRANCHING.md to .claude/REFERENCES.md docs index

Step 2 of the open-source repo maintenance baseline initiative.
Branch protection rules are documented in BRANCHING.md but NOT
applied to GitHub yet β€” they will be enabled after this PR merges
to avoid blocking the very PR that introduces them.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 8, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

βš™οΈ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 59614b19-e984-4757-9db6-e092311679df

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • πŸ” Trigger review
✨ Finishing Touches
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/branching-strategy

Comment @coderabbitai help to get the list of available commands and usage tips.

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