-
Notifications
You must be signed in to change notification settings - Fork 3
Fix stringbool conversion #64
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.
Thank you for sharing your code. Here is some supportive feedback powered by AI. These suggestions are ideas, not guarantees. Choose what works for you and trust your judgment as AI stands by to assist.
Model: o4-mini | Prompt Tokens: 4055 | Completion Tokens: 5925
|
This change introduces a new environment flag to control model metadata in summaries and streamlines input validation by replacing coercions with stricter Zod types, improving consistency without altering end-user functionality. Walkthrough
Model: o4-mini | Prompt Tokens: 1303 | Completion Tokens: 464 |
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.
Here's a supportive code review enhanced by AI assistance. These suggestions offer potential improvements, though they're recommendations rather than requirements. You have complete control over which insights to implement—AI simply provides additional perspective to help inform your decisions. Use what feels valuable and fits your project's needs.
Model: anthropic--claude-4-sonnet | Prompt Tokens: 2411 | Completion Tokens: 516
* Change showModelMetadataFooter input type from boolean to stringbool * Refactor input parsing to use z.string() instead of z.coerce.string() * add INPUT_SHOW_MODEL_METADATA_FOOTER
Context:
If I set in the "calling" action file show-model-metadata-footer to false, the model metadata will still be shown.
Reason: z.coerce.boolean() treats the string 'false' as truthy value.
Solution:
This change removes unnecessary string coercion from input parsing throughout the configuration system and adds a new environment variable placeholder for controlling model metadata display in footers.
Walkthrough
z.coerce.string()calls and replacing them with directz.string()validation, improving type safety and clarityz.stringbool()instead ofz.coerce.boolean()for the model metadata footer display settingINPUT_SHOW_MODEL_METADATA_FOOTERto support configuration of model metadata visibility in PR summariesModel: anthropic--claude-4-sonnet | Prompt Tokens: 1608 | Completion Tokens: 157