Repository navigation
Development
Brandon Young edited this page Nov 5, 2026
·
1 revision
make build # bin/notion-md-sync
make test # go test ./...
make lint # golangci-lint run
make fmt # go fmt ./...
make clean
make dev-setup # install development toolsWithout make:
go build -o notion-md-sync ./cmd/notion-md-sync
go test ./...
go test -run TestName ./pkg/sync
go test -coverprofile=coverage.out ./... && go tool cover -html=coverage.out| Package | What |
|---|---|
pkg/notion |
Notion API client (Notion-Version: 2026-03-11), block diff, kept-block rules |
pkg/sync |
Sync engine, Markdown ↔ block converter, folder layout, CSV export, conflicts |
pkg/markdown |
Frontmatter parsing |
pkg/staging |
add / reset / status
|
pkg/watcher |
watch |
pkg/tui |
Terminal UI (Bubble Tea) |
pkg/cli |
Cobra commands |
internal/notionfake |
In-memory Notion API used by tests |
Tests don't need a Notion account. pkg/notion/fake_server_test.go and internal/notionfake stand in for the API, and pkg/sync/memnotion_test.go is an in-memory client for engine scenarios. If you change the converter, add a case to TestConverter_RoundTripIsStable.
-
CI (
ci.yml) runs on pushes and pull requests tomain: gofmt, vet, tests with the race detector, and golangci-lint. -
Release (
release.yml) runs onv*tags: builds Linux, macOS and Windows binaries for amd64 and arm64, and creates the GitHub release.
- Write the notes in
docs/releases/vX.Y.Z.md. - Tag and push:
git tag vX.Y.Z git push origin vX.Y.Z
- GitHub Actions builds the binaries and publishes the release using those notes.
See CONTRIBUTING.md. In short: fork, branch, keep go test ./... and golangci-lint run clean, open a pull request.