Skip to content

Ensure toolsets are configurable via env var #348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 25, 2025

Conversation

williammartin
Copy link
Collaborator

Description

Fixes #307

Reviewer Notes

You can run the e2e tests and see a failure by adjusting GITHUB_TOOLSETS and running:

GITHUB_MCP_SERVER_E2E_TOKEN=foo go test -v -run  "TestToolsets" --tags e2e ./e2e

@Copilot Copilot AI review requested due to automatic review settings April 25, 2025 12:06
@williammartin williammartin requested a review from a team as a code owner April 25, 2025 12:06
@williammartin williammartin linked an issue Apr 25, 2025 that may be closed by this pull request
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR makes toolsets configurable via an environment variable by refactoring the e2e test setup and updating the main server code to correctly unmarshal toolset configurations. Key changes include:

  • Refactoring e2e tests to use sync.Once for token retrieval and Docker image building, along with introducing a ClientOpts mechanism to pass environment variables.
  • Adding a new TestToolsets to validate toolset configuration via the environment variable.
  • Updating the main command to unmarshal the "toolsets" configuration from the environment using viper.UnmarshalKey.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
e2e/e2e_test.go Refactored test setup and added toolset configuration test using new client options.
cmd/github-mcp-server/main.go Modified toolset configuration handling to support comma-separated values via environment vars.

Copy link
Collaborator

@SamMorrowDrums SamMorrowDrums left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really neat PR. Loving the tests.

@williammartin williammartin merged commit 4e26dce into main Apr 25, 2025
16 checks passed
@williammartin williammartin deleted the 307-toolset-does-not-exists-using-github_toolsets branch April 25, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

toolset does not exists using GITHUB_TOOLSETS
2 participants