Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
Contributions to this project are released to the public under the project's open source license.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
- Go (version specified in
go.mod) - GitHub CLI (
gh) v2.0+
# Clone the repository (or your fork)
git clone https://github.com/github/gh-stack.git
cd gh-stack
# Download dependencies
go mod downloadgo build ./...This produces a gh-stack binary in the current directory.
# Run all tests with race detection
go test -race -count=1 ./...go vet ./...To test your local build as a gh CLI extension:
# Build the binary
go build -o gh-stack .
# Remove any existing installation
gh extension remove stack
# Install from the local directory
gh extension install .You can now run gh stack and it will use your locally built version.
The documentation site lives in docs/ and uses Astro + Starlight.
cd docs
npm install
npm run dev # Start dev server at localhost:4321
npm run build # Production build to docs/dist/- Fork and clone the repository
- Create a new branch:
git checkout -b my-branch-name - Make your change and add tests
- Make sure tests pass:
go test -race -count=1 ./... - Make sure vet passes:
go vet ./... - Push to your fork and submit a pull request
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
- Write tests.
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
- Write a good commit message.