Thank you for your interest in contributing to devlog.
Prerequisites:
- Go 1.26+ (
go version) - golangci-lint v2.x (
golangci-lint --version) - Optional: gh CLI for PR integration testing
Clone and build:
git clone https://github.com/kacheo/devlog
cd devlog
go build -o devlog .
./devlog --helpRun all checks locally — CI will enforce them:
make lint # golangci-lint run ./...
make test # go test -race -covermode=atomic -coverprofile=coverage.out ./...Coverage must stay at or above 70% overall. The CI job will fail below this threshold.
cmd/— public command surface; add new commands hereinternal/— implementation details; never import from outside this repocmd/may import frominternal/;internal/packages must not importcmd/
Use conventional commit prefixes:
feat: a new feature
fix: a bug fix
docs: documentation only
test: adding or updating tests
refactor: code change that neither fixes a bug nor adds a feature
chore: build, CI, or tooling changes
These prefixes are used to generate the release changelog. docs:, test:, and chore:
entries are excluded from the published changelog.
- Create
cmd/mycommand.gowith a Cobra command registered ininit() - Add the command to the root in
cmd/root.go - Add
cmd/mycommand_test.gowith coverage for the happy path and error cases - Update the command table in
README.md
go test ./cmd/... -run TestShow # run TestShow* in cmd/
go test ./internal/git/... # run all tests in internal/gitReleases are automated via goreleaser. Maintainers tag a release:
make release VERSION=v0.2.0This creates the git tag and pushes it, which triggers the release GitHub Actions workflow.