Contributing
DataKit is a Go monorepo, so contributions are expected to include code, tests, and documentation updates when behavior changes. Use a short-lived branch, validate locally, and open a pull request with a conventional title.
flowchart LR
I[Pick issue or change] --> B[Create branch]
B --> C[Implement change]
C --> T[Run lint and tests]
T --> P[Open pull request]
P --> R[Address review]
Branch conventions
Create branches from your working branch using the conventions documented in
CONTRIBUTING.md:
git checkout -b feature/your-feature-name
# or
git checkout -b fix/issue-number-descriptionKeep changes scoped to a single feature or fix so the resulting PR is easy to review.
Pull request workflow
Before opening a PR:
- run the relevant tests
- run linting
- update docs when user-facing behavior changes
- make sure generated artifacts were regenerated instead of edited by hand
The root guide also expects PR titles and commit messages to follow conventional commit style, for example:
feat: add PII validation to lint commandfix: resolve binding reference validationdocs: update CLI reference documentation
Code style
For Go code, follow the repository guidance from CONTRIBUTING.md:
- use standard Go formatting tools such as
go fmt ./... - keep exported identifiers documented
- write lowercase error messages without trailing punctuation
- prefer table-driven tests for multiple scenarios
- mock external dependencies in unit tests
Local validation
The repository-level targets are the default pre-PR checks:
make lint
make test-unit
make test-integration
make test-e2eIf you only changed one module, you can still run focused go test commands,
but the shared Make targets are the canonical project checks.
Documentation and generated files
Update relevant docs alongside behavior changes. For generated files such as CRDs, deepcopy files, protobuf outputs, or scaffolded manifests, change the generator input and re-run the generator instead of hand-editing generated output.