Skip to content

Add optional string array param #101

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 1 commit into from
Apr 4, 2025

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 Copilot AI review requested due to automatic review settings April 4, 2025 15:25
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 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
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.

4 participants