Skip to content

Latest commit

 

History

History
96 lines (69 loc) · 3.41 KB

File metadata and controls

96 lines (69 loc) · 3.41 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 for running and testing code

This is a multi-language SDK repository. Install the tools for the SDK(s) you plan to work on:

All SDKs

  1. Install just command runner

Node.js/TypeScript SDK

  1. Install Node.js (v18+)
  2. Install dependencies: cd nodejs && npm ci

Python SDK

  1. Install Python 3.8+
  2. Install uv
  3. Install dependencies: cd python && uv pip install -e ".[dev]"

Go SDK

  1. Install Go 1.23+
  2. Install golangci-lint
  3. Install dependencies: cd go && go mod download

.NET SDK

  1. Install .NET 8.0+
  2. Install dependencies: cd dotnet && dotnet restore

Submitting a pull request

  1. Fork and clone the repository
  2. Install dependencies for the SDK(s) you're modifying (see above)
  3. Make sure the tests pass on your machine (see commands below)
  4. Make sure linter passes on your machine (see commands below)
  5. Create a new branch: git checkout -b my-branch-name
  6. Make your change, add tests, and make sure the tests and linter still pass
  7. Push to your fork and submit a pull request
  8. Pat yourself on the back and wait for your pull request to be reviewed and merged.

Running tests and linters

Use just to run tests and linters across all SDKs or for specific languages:

# All SDKs
just test          # Run all tests
just lint          # Run all linters
just format        # Format all code

# Individual SDKs
just test-nodejs   # Node.js tests
just test-python   # Python tests
just test-go       # Go tests
just test-dotnet   # .NET tests

just lint-nodejs   # Node.js linting
just lint-python   # Python linting
just lint-go       # Go linting
just lint-dotnet   # .NET linting

Or run commands directly in each SDK directory:

# Node.js
cd nodejs && npm test && npm run lint

# Python
cd python && uv run pytest && uv run ruff check .

# Go
cd go && go test ./... && golangci-lint run ./...

# .NET
cd dotnet && dotnet test test/GitHub.Copilot.SDK.Test.csproj

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