Skip to content

Latest commit

 

History

History
96 lines (65 loc) · 2.62 KB

File metadata and controls

96 lines (65 loc) · 2.62 KB

Contributing

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.

Prerequisites

Local setup

# Clone the repository (or your fork)
git clone https://github.com/github/gh-stack.git
cd gh-stack

# Download dependencies
go mod download

Build

go build ./...

This produces a gh-stack binary in the current directory.

Test

# Run all tests with race detection
go test -race -count=1 ./...

Vet

go vet ./...

Install locally as a gh extension

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.

Docs site

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/

Submitting a pull request

  1. Fork and clone the repository
  2. Create a new branch: git checkout -b my-branch-name
  3. Make your change and add tests
  4. Make sure tests pass: go test -race -count=1 ./...
  5. Make sure vet passes: go vet ./...
  6. 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.

Resources