Commit conventions¶
Process overview (standards map, DCO, merge policy, expectations) β ../CONTRIBUTING.md
Developer guidelines for MKurator: commit message format, gitmoji, changelog, and release notes. For local setup see DEVELOPMENT.md; for Go style, testing, and agent workflow see AGENTS.md.
Doc index: README.md
On this page¶
| Section | |
|---|---|
| βοΈ | Commit message format |
| π·οΈ | Types and scopes |
| π | Gitmoji |
| π₯ | Breaking changes |
| π | Examples |
| π° | Changelog and releases |
| β | Before you open a PR or push |
Commit message format¶
Every commit uses Conventional Commits plus a gitmoji code in the subject.
<type>(<optional scope>): :<gitmoji>: <short summary>
<optional body>
<optional footer>
| Part | Rules |
|---|---|
| type | Required. Lowercase. See types. |
| scope | Optional but encouraged when the change is localized (e.g. mqrest, webhook). |
| gitmoji | Required. ASCII shortcode immediately after the first colon, before the summary (:sparkles:, not the Unicode emoji). |
| summary | Imperative mood, lowercase start, no trailing period, ~50 characters or less. |
| body | Optional. Wrap at ~72 columns. Explain what and why, not file lists. |
| footer | Optional. Breaking changes, issue refs (Closes #123). |
Subject line regex (informal):
^(feat|fix|docs|style|refactor|test|chore|ci|build)(\([^)]+\))?!?: :[a-z0-9_]+: .+$
Release notes are generated from these subjects by git-cliff (ADR-0008); malformed commits are skipped or grouped incorrectly.
Types and scopes¶
Types¶
| Type | When to use | In user-facing changelog? |
|---|---|---|
feat |
New behaviour users or operators care about | Yes (Features) |
fix |
Bug fix | Yes (Bug Fixes) |
refactor |
Code change without fixing a bug or adding a feature | Yes (Refactoring) |
perf |
Performance improvement | Yes |
docs |
Documentation only | No (skipped by default) |
test |
Tests only | No |
chore |
Tooling, deps, repo hygiene | No |
ci |
CI/CD workflows | No |
build |
Build system, Dockerfile, Taskfile | No |
style |
Formatting, whitespace (no logic change) | No |
Scopes (suggested)¶
Use a scope when it helps readers and changelog grouping. Common scopes in this repo:
| Scope | Typical area |
|---|---|
controller |
internal/controller reconcilers |
mqrest |
internal/adapter/mqrest REST client |
webhook |
internal/webhook, internal/validation |
queue, topic, channel, messaging |
CR-specific reconcile or API |
chart |
charts/mkurator Helm chart |
ci |
.github/workflows |
docs |
docs/, README |
test |
test/, *_test.go |
cluster |
hack/kind-cluster local platform |
Omit scope only when the change truly spans the tree (e.g. chore: :wrench: bump Go to 1.26).
Gitmoji¶
Required: every subject includes exactly one gitmoji shortcode between the first colon and the summary:
feat(queue): :sparkles: reconcile QLOCAL via mqweb
^ ^^^^^^^^^^
| gitmoji (required)
type + optional scope
Use the gitmoji meaning that best matches the changeβnot decorative emoji. Prefer the table below; the full catalogue is on gitmoji.dev.
| Gitmoji | Code | Use for |
|---|---|---|
| β¨ | :sparkles: |
New feature |
| π | :bug: |
Bug fix |
| π | :memo: |
Documentation |
| β | :white_check_mark: |
Add, update, or fix tests |
| β»οΈ | :recycle: |
Refactor |
| π§ | :wrench: |
Configuration files (Taskfile, YAML config, Helm values) |
| π· | :construction_worker: |
CI build system |
| π§± | :bricks: |
Infrastructure / platform (kind, Terraform, Docker MQ) |
| π | :see_no_evil: |
.gitignore or ignore rules |
| β¬οΈ | :arrow_up: |
Upgrade dependency |
| β¬οΈ | :arrow_down: |
Downgrade dependency |
| π | :lock: |
Security |
| ποΈ | :ambulance: |
Critical hotfix |
| π¨ | :art: |
Improve structure/format of code (style) |
| β‘ | :zap: |
Performance |
| π₯ | :fire: |
Remove code or files |
| βοΈ | :pencil2: |
Fix typos |
Do not:
- Put the Unicode emoji in the subject instead of the shortcode (
feat: β¨ addβ wrong). - Omit the gitmoji (
feat(queue): add reconcileβ wrong). - Use multiple gitmojis in one subject.
Breaking changes¶
API or behaviour breaks for consumers (CRD schema, reconcile semantics, install manifests) must be visible in the commit and changelog.
- Add
!after the type or scope:feat(api)!: :sparkles: rename spec field. - Describe migration in the body or a
BREAKING CHANGE:footer (Conventional Commits style).
refactor!: :recycle: rename module to github.com/platformrelay/MKurator
BREAKING CHANGE: import paths and container image registry moved to platformrelay/MKurator.
Breaking commits appear under Breaking Changes in CHANGELOG.md.
Examples¶
Good:
feat(queue): :sparkles: reconcile Queue into MQSC DEFINE QLOCAL
fix(mqrest): :bug: retry on 5xx from mqweb admin endpoint
docs: :memo: document QueueManagerConnection secret reference
test(controller): :white_check_mark: add envtest for deletion finalizer
ci: :construction_worker: pin git-cliff-action to v4.8.0
chore(deps): :arrow_up: bump controller-runtime to v0.23.3
Bad:
fixed queue bug # no type, no gitmoji
feat: add queue reconcile # missing gitmoji
feat(queue): add queue reconcile # missing gitmoji shortcode
feat(queue): β¨ add reconcile # Unicode emoji instead of :sparkles:
WIP # not conventional
feat(queue): :sparkles: Fixed the thing. # past tense, trailing period
Changelog and releases¶
CHANGELOG.md is generated from git history, not hand-written
per bullet.
| Task | Purpose |
|---|---|
task changelog |
Preview the Unreleased section |
task changelog:write |
Regenerate full CHANGELOG.md |
task changelog:release |
Print notes for the latest tag |
Maintainer release flow β full runbook: RELEASE.md. Summary:
- Merge work on
mainwith conventional commits. task changelogβ sanity-check grouping.- Bump
charts/mkurator/Chart.yamlversionandappVersion. task changelog:writeβ commitCHANGELOG.md.git tag vX.Y.Z && git push origin vX.Y.Zβ CI publishes image and GitHub Release.
Only feat, fix, perf, refactor, and breaking commits appear in the
user-facing changelog; docs / test / chore / ci / build / style are
skipped (cliff.toml).
Before you open a PR or push¶
See ../CONTRIBUTING.md for the full preflight checklist and merge policy. Minimum before push:
task verifyβ CRDs, RBAC, deepcopy, mocks are up to date.task lintβ golangci-lint clean.task test:runβ unit + envtest green (-race).- Commit message follows commit message format with DCO sign-off when able.
Further reading¶
| Doc | Topic |
|---|---|
| ../CONTRIBUTING.md | Standards map, DCO, code review |
| DEVELOPMENT.md | Local setup, Task commands, test tiers |
| AGENTS.md | Go conventions, codegen, CI parity |
| CICD.md | Pipeline and release job |
| RELEASE.md | Maintainer release runbook |
| adr/0008-changelog-git-cliff.md | Why git-cliff |
| SECURITY.md | Reporting vulnerabilities |