SnowTower uses a release branch workflow:
feature/* ──► v0.x (release branch) ──► main
The following branches are protected and require PRs:
| Branch | Purpose | Protection |
|---|---|---|
main |
Production releases | PR required, 1 approval, CI must pass |
v* |
Release staging | PR required, 1 approval (automatic via ruleset) |
You cannot push directly to main or release branches.
Note: Release branches (
v0.2,v0.3,v1.0, etc.) are automatically protected by a GitHub ruleset that matchesv*. New release branches get protection automatically - no manual setup required.
-
Create feature branch from the current release branch:
git checkout v0.2 git pull origin v0.2 git checkout -b feature/my-feature
-
Make changes and commit:
# Run pre-commit before committing uv run pre-commit run --all-files git add . git commit -m "feat: Add my feature"
-
Push and create PR targeting the release branch:
git push -u origin feature/my-feature gh pr create --base v0.2
-
After PR approval and merge, changes go to the release branch
-
When ready to release, the release branch merges to
mainand gets tagged
All PRs must pass CI checks before merging:
- Lint & Format Check:
uv run pre-commit run --all-files - Run Tests:
uv run pytest
Before pushing, always run:
# Install pre-commit hooks (one-time)
uv run pre-commit install
# Run all checks
uv run pre-commit run --all-files
uv run pytestUse Conventional Commits:
feat: Add new feature
fix: Fix bug
docs: Update documentation
style: Format code
refactor: Refactor code
test: Add tests
chore: Maintenance tasks
Examples:
git commit -m "feat: Add user creation workflow"
git commit -m "fix: Correct warehouse auto-suspend timing"
git commit -m "docs: Update README badges"PRs should include:
- Summary: What changed and why
- Change Type: Infrastructure / Code / Documentation / Tests / CI/CD
- Related Issues: Link issues with
Closes #123orFixes #123 - Test Plan: How you verified the changes
- Checklist: Pre-commit passes, no secrets, tests pass
When your PR addresses an issue, use closing keywords:
Closes #123
Fixes #456This automatically closes the issue when the PR is merged.
- All features merged to release branch (e.g.,
v0.2) - Final testing on release branch
- Create PR from release branch to
main - Merge and tag:
git checkout main git pull git tag v0.2.0 git push origin v0.2.0
- Release workflow automatically creates GitHub Release
- Don't push directly to
mainor release branches - Don't force push to protected branches
- Don't skip pre-commit hooks
- Don't merge without CI passing
- Don't include secrets in commits (credentials, API keys, etc.)
- Issues: Open an issue
- Discussions: Use GitHub Discussions for questions