-
Notifications
You must be signed in to change notification settings - Fork 627
Add missing enum constraints #278
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
Conversation
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 adds missing enum constraints for various string properties to ensure only the allowed values are accepted.
- Enforced enum constraints for pull request state, sort options, merge methods, and review event types in pkg/github/pullrequests.go.
- Added enum constraints for code scanning alert states and severity levels in pkg/github/code_scanning.go.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
pkg/github/pullrequests.go | Added enum constraints for pull request query and review parameters. |
pkg/github/code_scanning.go | Added enum constraints for code scanning alerts parameters. |
2928235
to
a92e445
Compare
f810b65
to
5a7d13c
Compare
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.
Added one minor suggestion (the word category doesn't add much I think) but it's a nit, and this looks great. Thanks for all your work on finding all these!
This pr adds some missing enum constraints for string props with enum like categories.
It also removes those listed enums from the descriptions, as the llm already receives the list of possible candidates by the the enum constraint.
This will save tokens as noted by @SamMorrowDrums
In regard to #228
Example testing with Copilot(Model Claude 3.7 Sonnet):