Skip to content

Conversation

@williammartin
Copy link
Collaborator

Description

Fixes an integration bug introduced in #82, where the MCP host was providing a slice that was treated as []any and not coerced to []string.

Copilot AI review requested due to automatic review settings April 4, 2025 15:25
Copy link
Contributor

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 introduces an optional string array parameter handling to fix an integration bug where parameters provided as []any were not properly coerced to []string.

  • Introduces a new helper function optionalStringArrayParam in pkg/github/server.go.
  • Adds new tests in pkg/github/server_test.go to validate the behavior of string array parameter handling.
  • Updates issues related functions and tests in pkg/github/issues.go and pkg/github/issues_test.go to utilize the new helper.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
pkg/github/server_test.go New test cases for validating optional string array parameter handling.
pkg/github/server.go New helper function optionalStringArrayParam with improved type checking and error messages.
pkg/github/issues_test.go Updated test cases to provide []any for assignees and labels.
pkg/github/issues.go Replaced use of generic optionalParam with optionalStringArrayParam for parameters conversion.

Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more

@williammartin williammartin force-pushed the wm/optional-string-array-param branch from baf5038 to 255ba08 Compare April 4, 2025 15:26
@williammartin williammartin merged commit 6e132eb into main Apr 4, 2025
16 checks passed
@williammartin williammartin deleted the wm/optional-string-array-param branch April 4, 2025 15:30
DaleSeo pushed a commit to DaleSeo/github-mcp-server that referenced this pull request Oct 24, 2025
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.

5 participants