Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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 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 7 commits into from
Jun 26, 2025
Merged

Conversation

JoannaaKL
Copy link
Contributor

@JoannaaKL JoannaaKL commented Jun 25, 2025

Adds a normalisation function that will replace underscores with dashed in config keys.
Addresses: #577

@Copilot Copilot AI review requested due to automatic review settings June 25, 2025 13:47
@JoannaaKL JoannaaKL requested a review from a team as a code owner June 25, 2025 13:47
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 adds an underscore variant (read_only) alongside the existing read-only flag and updates the server configuration to respect both.

  • Combines viper.GetBool("read-only") and viper.GetBool("read_only") when setting the ReadOnly field
  • Registers two CLI flags (--read-only and --read_only) bound to the same readOnlyFlag variable
Comments suppressed due to low confidence (1)

cmd/github-mcp-server/main.go:74

  • The new read_only alias isn’t covered by any existing tests. Consider adding unit tests to verify that both --read-only and --read_only correctly enable read-only mode.
	rootCmd.PersistentFlags().BoolVar(&readOnlyFlag, "read_only", false, "Restrict the server to read-only operations")

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.

I think this can be simplified and achieve the goal. Thanks for rapid fix.

@SamMorrowDrums SamMorrowDrums merged commit 96f0173 into github:main Jun 26, 2025
9 checks passed
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.

2 participants