Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix handling nil values for optional string array parameters,#194

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tonytrg merged 2 commits intomainfromFixNilOptionalValues
Apr 9, 2025

Conversation

A-Georgiou
Copy link
Contributor

@A-GeorgiouA-Georgiou commentedApr 9, 2025
edited
Loading

When attempting to use Claude for MCP tooling, any optional arrays it currently submits a nil value instead of an empty array which results in a returned error. This change adjusts that to return an empty array instead of an error for nil optional arrays.

Closes:#193

nil values should be equivalent to an empty string, currently we return an error but Claude passes nil for optional values.
@CopilotCopilotAI review requested due to automatic review settingsApril 9, 2025 13:20
Copy link
Contributor

@CopilotCopilotAI 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 fixes the handling of nil optional string array parameters by returning an empty array instead of an error.

  • Updated the parameter parsing in pkg/github/server.go to treat nil values as an empty array.
  • Added a test in pkg/github/issues_test.go to verify that nil inputs no longer cause failures.

Reviewed Changes

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

FileDescription
pkg/github/server.goAdded a nil case in the switch to return an empty array.
pkg/github/issues_test.goAdded a test case for nil assignees to validate behavior.

Copy link
Contributor

@tonytrgtonytrg left a comment
edited
Loading

Choose a reason for hiding this comment

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

LGTM! Thank you 💯

@tonytrgtonytrg merged commit86fbc85 intomainApr 9, 2025
16 checks passed
@tonytrgtonytrg deleted the FixNilOptionalValues branchApril 9, 2025 16:26
manian0430 pushed a commit to ChrisLally/github-mcp-server that referenced this pull requestApr 12, 2025
…#194)* Fix handling nil values for optional string array parameters,nil values should be equivalent to an empty string, currently we return an error but Claude passes nil for optional values.* lint fixes
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@tonytrgtonytrgtonytrg approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Nil values for optional arrays returns error
2 participants
@A-Georgiou@tonytrg

[8]ページ先頭

©2009-2025 Movatter.jp