| Branch pattern | Purpose |
|---|---|
main |
Stable delivery branch. Direct commits are not permitted. |
feature/<REQ-ID>-<short-description> |
New feature or requirement implementation. |
fix/<short-description> |
Bug fix or hotfix. |
delivery/<milestone> |
Release preparation (docs, changelog, final integration). |
Branch off main, open a pull request back to main. Delete the branch after merge.
Use the following prefixes:
feat(<scope>): short description
fix(<scope>): short description
docs: short description
ci: short description
refactor: short description
test: short description
Rules:
- Subject line: 72 characters maximum, imperative mood, no trailing period.
- Scope is optional but recommended for
featandfix(e.g.operator,backup,deploy). - Body is optional; use it to explain why, not what.
- Do not reference ticket numbers in commit messages; use the branch name for traceability.
- Open the PR against
mainwith a title following the commit conventions above. - The PR description must summarise the change and list any deferred or untested items.
- At least one reviewer approval is required before merge.
- All CI quality gates (see below) must pass before merge is permitted.
- Squash merge is preferred to keep
mainhistory linear. - The author resolves review comments; the reviewer approves the resolution.
Every PR must pass the following checks before it can be merged. These run automatically
on push and pull request events via the OCM Build & Deploy workflow and Security Scan
workflow.
| Gate | Tool | Failure condition |
|---|---|---|
| YAML Lint | yamllint | Any syntax error or rule violation in manifests/, kro/, charts/, examples/ |
| Shell Lint | ShellCheck -S warning |
Any warning or error in scripts/**/*.sh |
| Secrets Scan | Gitleaks | Any credential or secret pattern detected in the git history |
| Go Vet | go vet ./... |
Any static analysis error in operator/ |
| Non-root Check | scripts/tests/test-security.sh |
Any Deployment manifest missing allowPrivilegeEscalation: false, runAsNonRoot: true, or capabilities.drop: [ALL] |
| CVE Scan | Trivy | Any unfixed HIGH or CRITICAL CVE in a container image shipped in the OCM archive |
Bypass is not permitted. If a gate fails, fix the underlying issue — do not skip or disable the gate.
# 1. Create a branch
git checkout main && git pull
git checkout -b feature/REQ-XX-short-description
# 2. Make changes, commit, push
git add <files>
git commit -m "feat(scope): describe the change"
git push -u origin feature/REQ-XX-short-description
# 3. Open a pull request via GitHub
# 4. Address review comments, push additional commits
# 5. Merge after approval and all gates greenRun the same checks locally before pushing to avoid CI failures:
# YAML lint
yamllint -d '{extends: default, rules: {line-length: {max: 150}, truthy: {check-keys: false}, document-start: disable, comments-indentation: disable}}' manifests/ kro/ charts/ examples/
# ShellCheck
shellcheck -S warning scripts/**/*.sh
# Go vet
cd operator && go vet ./...
# Non-root security check
./scripts/tests/test-security.sh
# Secrets scan (requires gitleaks in PATH)
gitleaks git .