- Notifications
You must be signed in to change notification settings - Fork3.2k
Add underscore variant#581
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
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 an underscore variant (read_only) alongside the existingread-only flag and updates the server configuration to respect both.
- Combines
viper.GetBool("read-only")andviper.GetBool("read_only")when setting theReadOnlyfield - Registers two CLI flags (
--read-onlyand--read_only) bound to the samereadOnlyFlagvariable
Comments suppressed due to low confidence (1)
cmd/github-mcp-server/main.go:74
- The new
read_onlyalias isn’t covered by any existing tests. Consider adding unit tests to verify that both--read-onlyand--read_onlycorrectly enable read-only mode.
rootCmd.PersistentFlags().BoolVar(&readOnlyFlag, "read_only", false, "Restrict the server to read-only operations")Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
SamMorrowDrums left a comment
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.
Ithink this can be simplified and achieve the goal. Thanks for rapid fix.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
96f0173 intogithub:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Adds a normalisation function that will replace underscores with dashed in config keys.
Addresses:#577