The extension requires the gh CLI to be installed and added to the PATH. Users must also
authenticate via gh auth before using the extension.
For development, we use Go with a minimum version of 1.22.
$ go version
go version go1.22.x <arch>To build the project, run make build (or script/build). After building, you can run the binary locally, for example:
./gh-models list.
To run lint tests, unit tests, and other Go-related checks before submitting a pull request, use:
make checkWe also provide separate scripts for specific tasks, where check runs them all:
make test
make fmt # for auto-formatting
make vet # to find suspicious constructs
make tidy # to keep dependencies up-to-dateIn addition to unit tests, we have integration tests that use the compiled binary to test against live endpoints:
# Build the binary first
make build
# Run integration tests
cd integration
go test -vIntegration tests are located in the integration/ directory and automatically skip tests requiring authentication when no GitHub token is available. See integration/README.md for more details.
When upgrading or installing the extension using gh extension upgrade github/gh-models or
gh extension install github/gh-models, the latest release will be pulled, not the latest commit. Therefore, all
changes require a new release:
git tag v0.0.x main
git push origin tag v0.0.xThis process triggers the release action, which runs the production build.