Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR restricts the possible string values for several search parameters by adding enum validations, addressing issue #79.
- Added mcp.Enum validations for sort order in searchCode and searchUsers.
- Introduced mcp.Enum for various fields (sort, order, state, etc.) in searchIssues and listIssues to restrict accepted values.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/github/search.go | Added enums to enforce allowed values for 'order' parameters. |
| pkg/github/issues.go | Introduced enums for fields such as 'sort', 'order', and 'state'. |
Comments suppressed due to low confidence (1)
pkg/github/issues.go:150
- The enum value 'reactions-+1' appears ambiguous and may be a typo. Consider verifying if it should be 'reactions+1' for clarity and consistency.
"reactions-+1",
Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more
2118e2a to
76e3ff4
Compare
76e3ff4 to
0c45320
Compare
e9bf1f1 to
e406c0f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Fixes #79
Reviewer Notes
This has no tests. We should consider adding some to validate they don't change unexpectedly, but let's split that into a separate issue.