- Notifications
You must be signed in to change notification settings - Fork897
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nil values should be equivalent to an empty string, currently we return an error but Claude passes nil for optional values.
There was a problem hiding this 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.
File | Description |
---|---|
pkg/github/server.go | Added a nil case in the switch to return an empty array. |
pkg/github/issues_test.go | Added a test case for nil assignees to validate behavior. |
tonytrg left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM! Thank you 💯
86fbc85
intomainUh oh!
There was an error while loading.Please reload this page.
…#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
Uh oh!
There was an error while loading.Please reload this page.
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