Your first contribution
From an idea to a tested, linted, reviewed pull request.
In this tutorial we land a small, real change — adding a case to the
MatchExclude glob dialect test — and walk it through the full
contribution path: change, test, gate, pull request.
Never commit to main; the branch protection requires a pull request. The
repository's own release tags use two namespaces — vX.Y.Z for the CLI
binary and <skill>/vX.Y.Z for skill releases — and a change never touches
either until review is done.
What we are building towards
At the end you will have:
- a feature branch with one focused commit,
- a green
mise run check, - an open pull request with a filled-out template.
Step 1 — Branch
git checkout -b fix/exclude-glob-docsStep 2 — Make the change
Every change starts in the package that owns the behavior. The exclusion
globs live in internal/release/bundle.go (MatchExclude), and their tests
in the same package. Open the test file and extend a table case.
Rules of thumb that the codebase follows:
- one package owns one concern (see the package map);
- tests are table-driven and live next to the code;
- domain packages never import
internal/cli.
Step 3 — Test the change
mise run testEvery test you can add in the same style helps the coverage gate
(mise run cover, minimum 90.0%; the script prints the current total).
Step 4 — Pass the gate
mise run checkThis runs build, vet, unit tests with race, coverage, golangci-lint,
actionlint, shellcheck, goreleaser check, the docs build and the e2e
lifecycle. Fix anything red before committing.
Step 5 — Commit
Commit messages follow the prefixes GoReleaser groups by — feat:, fix:,
docs:, test:, chore: — for example
test(release): cover negated character classes in MatchExclude.
docs: and test: commits are excluded from the CLI changelog by the
GoReleaser filter.
Step 6 — Push and open the pull request
git push -u origin fix/exclude-glob-docsOpen the PR against main and fill .github/PULL_REQUEST_TEMPLATE.md.
CI (.github/workflows/ci.yml) then runs the Go matrix on ubuntu/macos/
windows, the race-and-coverage job, lint, govulncheck and the docs build;
CodeQL, dependency review and OpenSSF Scorecard run their own workflows.
Did you notice?
- You never needed the network: the whole gate runs locally.
- If your change touched
.github/workflows/,actionlintinmise run lintcatches schema mistakes before CI does.
Where to go next
- Drive the real workflows locally: Run CI locally with act.
- Where everything lives: Repository conventions.