Branching Strategy
All Moko Consulting repositories follow this branching model.
Branch flow
feature/* --> dev --> main
Protected branches
| Branch | Direct push | Who can push | Merge via |
|---|---|---|---|
main |
Blocked | jmiller (whitelisted) | PR merge only |
dev |
Blocked | jmiller (whitelisted) | PR merge from feature/* |
rc/* |
Blocked | jmiller (whitelisted) | PR merge only |
alpha/* |
Blocked | jmiller (whitelisted) | PR merge only |
beta/* |
Blocked | jmiller (whitelisted) | PR merge only |
feature/* |
Open | Anyone | N/A (source branch) |
version/* |
Auto-created | CI bot | Auto-created by auto-release |
Developer workflow
-
Start from
dev:git checkout dev && git pull git checkout -b feature/my-change -
Make changes and commit to
feature/* -
Open a PR:
feature/my-change->dev -
After review and merge, open a PR:
dev->main(when ready for release) -
Merging to
maintriggersauto-release.ymlwhich:- Bumps version (minor)
- Builds ZIP/tar.gz
- Creates MokoGitea release
- Updates updates.xml
- Recreates dev from main
Automated cascading
cascade-dev.yml runs on every push to main and forward-merges changes to dev. If there are conflicts, it creates a PR automatically.
This ensures dev is never behind main after a release.
Pre-release channels
Use pre-release.yml (manual dispatch) to build from any branch:
| Channel | Tag | Use case |
|---|---|---|
| development | development |
Nightly/latest from dev |
| alpha | alpha |
Early testing |
| beta | beta |
Feature-complete testing |
| release-candidate | release-candidate |
Final validation |
Pre-releases cascade: stable deletes all, rc deletes beta+alpha+dev, etc.
Branch protection enforcement
Branch protection is applied org-wide via the MokoGitea API. The jmiller user is whitelisted for push on all protected branches because:
- CI workflows (cascade-dev, auto-release, pre-release) authenticate with
GA_TOKENwhich belongs tojmiller - All other contributors must use PRs
To verify protection on a repo:
curl -sf -H "Authorization: token $TOKEN" \
"https://git.mokoconsulting.tech/api/v1/repos/MokoConsulting/REPO/branch_protections" | jq
- Home
-
api
- api-automation-index
- api-definitions-default-index
- api-definitions-sync-index
- api-deploy-index
- api-fix-index
- api-index
- api-maintenance-index.-
- api-maintenance-index
- api-plugin-index.-
- api-plugin-index
- api-tests-index.-
- api-tests-sample-index.-
- api-tests-sample-index
- api-validate-index.-
- maintenance-index
- automation
- features
- guides
- operations
- reference
- standards
- templates
-
workflows
- workflows-README.-
- workflows-README
- workflows-auto-release.-
- workflows-auto-release
- workflows-branch-protection.-
- workflows-branch-protection
- workflows-build-release.-
- workflows-build-release
- workflows-cascade-dev.-
- workflows-cascade-dev
- workflows-changelog-management.-
- workflows-changelog-management
- workflows-demo-deployment.-
- workflows-demo-deployment
- workflows-dev-branch-tracking.-
- workflows-dev-branch-tracking
- workflows-dev-deployment.-
- workflows-dev-deployment
- workflows-index.-
- workflows-index
- workflows-release-system.-
- workflows-release-system
- workflows-renovate.-
- workflows-renovate
- workflows-reusable-workflows.-
- workflows-reusable-workflows
- workflows-rs-deployment.-
- workflows-rs-deployment
- workflows-secret-scanning.-
- workflows-secret-scanning
- workflows-shared-workflows.-
- workflows-shared-workflows
- workflows-standards-compliance.-
- workflows-standards-compliance
- workflows-static-analysis.-
- workflows-static-analysis
- workflows-sub-issue-management.-
- workflows-sub-issue-management
- workflows-update-server.-
- workflows-update-server
- workflows-workflow-architecture.-
- workflows-workflow-architecture