Skip to content

Enumerate strings in schema #85

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 3 commits into from
Apr 3, 2025
Merged

Enumerate strings in schema #85

merged 3 commits into from
Apr 3, 2025

Conversation

williammartin
Copy link
Collaborator

@williammartin williammartin commented Apr 3, 2025

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.

@Copilot Copilot AI review requested due to automatic review settings April 3, 2025 19:53
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 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

SamMorrowDrums
SamMorrowDrums previously approved these changes Apr 3, 2025
Copy link
Collaborator

@SamMorrowDrums SamMorrowDrums left a comment

Choose a reason for hiding this comment

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

hhgf

@SamMorrowDrums SamMorrowDrums force-pushed the wm/use-arrays-rather-than-csv branch from e9bf1f1 to e406c0f Compare April 3, 2025 21:00
Base automatically changed from wm/use-arrays-rather-than-csv to main April 3, 2025 21:10
@SamMorrowDrums SamMorrowDrums dismissed their stale review April 3, 2025 21:10

The base branch was changed.

@SamMorrowDrums SamMorrowDrums merged commit 6b13742 into main Apr 3, 2025
16 of 17 checks passed
@SamMorrowDrums SamMorrowDrums deleted the wm-kw/enum-strings branch April 3, 2025 21:31
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.

Various tools are missing enumerated values
2 participants