- β Require pull request before merging
- β Require at least 2 approvals
- β Require status checks to pass (CI workflow)
- β Require branches to be up to date before merging
- β Require conversation resolution before merging
- β Do not allow force pushes
- β Do not allow deletions
- β Require pull request before merging
- β Require at least 1 approval
- β Require status checks to pass (CI workflow)
- β Require branches to be up to date before merging
- β Do not allow force pushes
- β Do not allow deletions
- Go to Settings β Branches in the GitHub repository.
- Click Add branch protection rule.
- Enter the branch name pattern (e.g.,
mainordev). - Enable the rules listed above.
- Click Save changes.
- Repeat for both
mainanddev. - Under Settings β General β Default branch, change the default to
dev.
All active development happens on the dev branch. The main branch is reserved for stable, production-ready releases only.
- Fork the repository (external contributors) or create a branch (team).
- Always branch off
dev:git checkout dev git pull origin dev git checkout -b feature/your-feature-name
- Make your changes, following our code style guidelines.
- Commit using Conventional Commits:
git commit -m "feat(scope): add new feature description" - Push to your fork/branch:
git push origin feature/your-feature-name
- Open a Pull Request targeting
dev(NOTmain). - Ensure all CI checks pass (automated via GitHub Actions).
- Address review feedback if requested.
- Merge happens after maintainer approval.
β οΈ IMPORTANT: Pull Requests targetingmainwill be closed automatically. Always targetdev.
| Prefix | Purpose | Example |
|---|---|---|
feature/ |
New features | feature/add-invoice-upload |
fix/ |
Bug fixes | fix/jwt-expiration-bug |
docs/ |
Documentation | docs/update-api-reference |
test/ |
Test additions | test/add-escrow-unit-tests |
refactor/ |
Code refactoring | refactor/simplify-auth-flow |
chore/ |
Maintenance | chore/update-dependencies |
Every Pull Request to dev automatically triggers our CI pipeline via GitHub Actions. Your PR must pass ALL checks before it can be merged:
- Lint / Format: Code formatting and linting rules.
- Type Check: Static type analysis (TypeScript / Rust Clippy).
- Tests: All unit and integration tests must pass.
- Build: The project must compile/build successfully.
Releases follow a controlled merge from dev to main:
- A maintainer creates a release PR:
devβmain. - The release PR includes a changelog and version bump.
- Two maintainer approvals are required.
- All CI checks must pass.
- After merge, a GitHub Release is created with a tag.
devis rebased onmainto stay in sync.
Contributors do NOT need to worry about releases. Focus on getting your PRs merged into dev.