The SOCIALIZER repository follows a protected trunk-based branching workflow with long-lived integration branches for staged deployments.
- main: Production-ready code. Protected by required reviews, status checks, and linear history.
- staging: Candidate releases that mirror the staging environment. Receives merges from
developonce feature toggles are validated. - develop: Default branch for day-to-day development. Feature branches branch off here and merge back through pull requests.
- feature/*: Short-lived branches scoped to a single task or user story. Rebased onto
developprior to merge. - hotfix/*: Emergency fixes branched from
mainand merged back into bothmainanddevelop.
The following protection rules should be configured in GitHub:
- main
- Require pull request reviews (minimum 2 approvers).
- Require status checks to pass: unit tests, lint, type checks.
- Require branches to be up to date before merging.
- Restrict who can push to administrators and CI.
- staging
- Require pull request review (minimum 1 approver).
- Require CI checks (integration tests, e2e smoke tests).
- Disallow force pushes and deletions.
- develop
- Require passing CI pipeline (lint, unit tests).
- Encourage squash merges to keep history clean.
- Create a feature branch:
git checkout -b feature/INFRA-005-env-config. - Develop the change, commit, and push to remote.
- Open a pull request targeting
develop. - Ensure automated checks pass and request review.
- Once approved, squash merge into
develop. - Promote to
stagingvia pull request when ready for QA. - After QA sign-off, merge
stagingintomainfor production release.
- Develop → Staging: As features reach QA readiness (multiple times per week).
- Staging → Main: On successful staging validation (weekly or as needed).
- Enforce commit message convention (Conventional Commits) through linting hooks.
- Tag releases from
mainusing semantic versioning (e.g.,v1.0.0). - Use GitHub Actions to enforce automated checks on pull requests.