Skip to content
Contributing

Contributing

Development setup

You need Go 1.27.4 or later (see go.mod).

git clone https://github.com/arush-sal/gt7-telemetry-collector
cd gt7-telemetry-collector
go build ./...
go test ./...
go run ./cmd/gt7-collector --version

Protobuf code is generated from proto/ (see buf.yaml and buf.gen.yaml) into gen/. The car reference tables in gt7data are generated by gt7data/internal/gen.

Quality gates

Run these before opening a pull request. CI runs the same checks.

gofmt -l .                      # must print nothing
golangci-lint run               # golangci-lint v2, config in .golangci.yml
go vet ./...
go test -race ./...
govulncheck ./...

Exported identifiers need a doc comment that starts with their name (enforced by the revive exported rule).

CI workflows

WorkflowTriggerWhat it does
test.ymlpush and PR to master, reusablegolangci-lint, go vet, go test -race with coverage.
security.ymlpush and PR to master, weekly, manual, reusableTrivy filesystem scans, zizmor audit of workflows, govulncheck.
build.ymlpush to master, manualGoReleaser snapshot build.
release.ymltag v*Security and tests, then GoReleaser, then build provenance attestation.
docs.ymlpush to master changing docs/** or the workflow, manualHugo build, deploy to GitHub Pages (master only).

All actions are pinned by full commit SHA.

Building the docs

Install Hugo extended v0.169.0 and Go. The Hextra theme is pinned to v0.13.0 in the separate docs/go.mod module; root Go commands exclude it.

hugo server --source docs       # live preview
hugo --gc --minify --source docs # CI build; output goes to docs/public/
hugo --printPathWarnings --source docs # check output path collisions

Pull requests run only tests and security checks. Releases call both reusable workflows with cache: false; release builds do not restore or save caches.

Releasing

Pushing a tag that matches v* runs the release workflow: it runs the security and test workflows, then GoReleaser builds archives for linux, darwin and windows (amd64, arm64), writes checksums.txt and SBOMs, signs every artifact with keyless cosign, publishes the GitHub Release, and attests build provenance.

git tag -s v0.1.0 -m "v0.1.0"
git push origin v0.1.0

Tags containing a pre-release suffix are published as pre-releases. The release workflow first verifies the tag: it must match vX.Y.Z or vX.Y.Z-rc.N and point at a commit on master history, otherwise nothing is built or published.

License

Business Source License 1.1 (LICENSE).

ParameterValue in LICENSE
Change Date2030-01-01
Change LicenseGNU General Public License version 3.0 (GPLv3)
Additional Use GrantNone.

Non-production use is permitted now; on the Change Date the work becomes available under GPLv3. See LICENSE for the full terms.