Git Workflow¶
Orion follows a trunk-based development model with the main branch as the primary integration branch.
Branch Strategy¶
gitgraph
commit id: "main"
branch feat/ORION-42-scout-rss
commit id: "feat: add RSS provider"
commit id: "test: RSS provider tests"
checkout main
merge feat/ORION-42-scout-rss id: "PR #42"
branch fix/ORION-43-auth-expiry
commit id: "fix: token expiry check"
checkout main
merge fix/ORION-43-auth-expiry id: "PR #43"
Branch Naming¶
Examples:
feat/ORION-42-scout-rss-providerfix/ORION-43-auth-token-expiryrefactor/ORION-44-director-cleanup
Commit Convention¶
All commits follow the format:
| Type | When to Use |
|---|---|
feat |
New feature or functionality |
fix |
Bug fix |
docs |
Documentation changes |
refactor |
Code restructuring (no behavior change) |
test |
Adding or updating tests |
chore |
Build, CI, config, dependencies |
Examples:
feat(ORION-15): implement ComfyUI WebSocket client
fix(ORION-23): handle expired JWT tokens gracefully
test(ORION-95): add comprehensive Media service tests
chore(ORION-95): add pre-commit config with golangci-lint, ruff, mypy
Pull Request Flow¶
- Create a feature branch from
main - Make changes with well-structured commits
- Push and open a PR against
main - CI runs automatically (lint-python, lint-frontend)
- Code review
- Merge to
main
Pre-commit Hooks¶
The project uses pre-commit to enforce quality before commits:
Configured hooks:
| Hook | Language | Tool |
|---|---|---|
| Go linting | Go | golangci-lint |
| Python linting | Python | ruff |
| Python type checking | Python | mypy |
PR Checklist¶
- Branch follows naming convention
- Commits follow commit convention
- Tests pass locally
- Pre-commit hooks pass
- New code has tests (80%+ coverage for Python)
- No secrets in code (check
.envnot committed) - Documentation updated if needed