Skip to content

Enumerate strings in schema - #85

Merged
SamMorrowDrums merged 3 commits into
mainfrom
wm-kw/enum-strings
Apr 3, 2025
Merged

Enumerate strings in schema#85
SamMorrowDrums merged 3 commits into
mainfrom
wm-kw/enum-strings

Conversation

@williammartin

@williammartinwilliammartin commented Apr 3, 2025

Copy link
Copy Markdown
Collaborator

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.

CopilotAI review requested due to automatic review settings April 3, 2025 19:53

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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.

FileDescription
pkg/github/search.goAdded enums to enforce allowed values for 'order' parameters.
pkg/github/issues.goIntroduced 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

@SamMorrowDrumsSamMorrowDrums left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hhgf

@SamMorrowDrums
SamMorrowDrumsforce-pushed the wm/use-arrays-rather-than-csv branch from e9bf1f1 to e406c0fCompareApril 3, 2025 21:00
Base automatically changed from wm/use-arrays-rather-than-csv to mainApril 3, 2025 21:10
@SamMorrowDrums
SamMorrowDrums dismissed their stale reviewApril 3, 2025 21:10

The base branch was changed.

@SamMorrowDrums
SamMorrowDrums merged commit 6b13742 into mainApr 3, 2025
@SamMorrowDrums
SamMorrowDrums deleted the wm-kw/enum-strings branch April 3, 2025 21:31
Sign up for freeto 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

3 participants

@williammartin@SamMorrowDrums