Thanks for your interest in making bkt better! We welcome issues, pull requests, docs fixes, and release automation improvements.
-
Be respectful and follow our Code of Conduct.
-
We do not require a CLA. Instead, by contributing you agree to the Developer Certificate of Origin (DCO). Please sign your commits with
git commit -s. -
Always include tests when you add or change behavior. Table-driven unit tests live alongside the package they exercise.
-
Run the quality gates before opening a PR:
make fmt make test make build make sbom # optional but encouraged if you have syft installed
-
For non-trivial changes, open an issue first so we can align on direction.
Tests live alongside the code they exercise (foo.go → foo_test.go).
go test ./... # Run all tests
go test ./pkg/bbdc/... # Run a single package
go test -run TestListPullRequests ./pkg/bbdc/ # Run a specific test
go test -coverprofile=coverage.out ./... && go tool cover -html=coverage.out # Coverage report- Table-driven tests for functions with multiple input/output cases.
httptest.NewServerfor API client tests — no real network calls.t.Cleanup()/deferfor resource teardown;t.TempDir()for temp files.t.Setenv()for environment overrides (automatically restored after test).- Descriptive test names that explain the scenario, not just the function.
- Both happy-path and error cases for every public function.
- Fork the repository and create a feature branch.
- Make your changes with clear, conventional commits (
feat:,fix:,docs:, etc.). - Update documentation and changelog entries when you change user-facing behavior.
- Run the quality gates listed above.
make testmust pass on Linux and macOS. - Open a pull request. Include:
- A concise summary of the change and rationale
- Testing notes (commands executed, platforms exercised)
- Screenshots or terminal captures for CLI UX changes
- Respond to review feedback. We aim to respond within two business days.
See README for the code layout. In short:
pkg/cmd/...holds Cobra commandspkg/bbdcandpkg/bbcloudencapsulate Bitbucket Data Center and Cloud APIsinternal/configpersists contexts/hosts in$XDG_CONFIG_HOME/bkt.github/contains automation, templates, and CI workflows
The detailed steps live in docs/RELEASE.md. In short:
- Update
CHANGELOG.mdwith the release notes. - Run
./scripts/release.sh X.Y.Zfrommasterto open the release PR. - After the release PR merges, GitHub Actions runs GoReleaser from the verified merged commit, creates the tag, publishes binaries, and builds SBOMs via Syft. Version, commit, and date are injected via ldflags.
Governance and decision-making guidelines live in GOVERNANCE.md. If you're interested in becoming a maintainer, open an issue so we can chat about expectations.