- 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.
Changes from3 commits
c85178d8e0c5eff3cb8a6f3e3a40f54546a13383ea043949bFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -49,12 +49,11 @@ var ( | ||
| Token: token, | ||
| EnabledToolsets: enabledToolsets, | ||
| DynamicToolsets: viper.GetBool("dynamic_toolsets"), | ||
| ReadOnly: viper.GetBool("read-only") || viper.GetBool("read_only"), | ||
JoannaaKL marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| ExportTranslations: viper.GetBool("export-translations"), | ||
| EnableCommandLogging: viper.GetBool("enable-command-logging"), | ||
| LogFilePath: viper.GetString("log-file"), | ||
| } | ||
| return ghmcp.RunStdioServer(stdioServerConfig) | ||
| }, | ||
| } | ||
| @@ -69,6 +68,7 @@ func init() { | ||
| rootCmd.PersistentFlags().StringSlice("toolsets", github.DefaultTools, "An optional comma separated list of groups of tools to allow, defaults to enabling all") | ||
| rootCmd.PersistentFlags().Bool("dynamic-toolsets", false, "Enable dynamic toolsets") | ||
| rootCmd.PersistentFlags().Bool("read-only", false, "Restrict the server to read-only operations") | ||
| rootCmd.PersistentFlags().Bool("read_only", false, "Restrict the server to read-only operations") | ||
JoannaaKL marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page.
JoannaaKL marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| rootCmd.PersistentFlags().String("log-file", "", "Path to log file") | ||
| rootCmd.PersistentFlags().Bool("enable-command-logging", false, "When enabled, the server will log all command requests and responses to the log file") | ||
| rootCmd.PersistentFlags().Bool("export-translations", false, "Save translations to a JSON file") | ||
| @@ -78,6 +78,7 @@ func init() { | ||
| _ = viper.BindPFlag("toolsets", rootCmd.PersistentFlags().Lookup("toolsets")) | ||
| _ = viper.BindPFlag("dynamic_toolsets", rootCmd.PersistentFlags().Lookup("dynamic-toolsets")) | ||
| _ = viper.BindPFlag("read-only", rootCmd.PersistentFlags().Lookup("read-only")) | ||
| _ = viper.BindPFlag("read_only", rootCmd.PersistentFlags().Lookup("read_only")) | ||
JoannaaKL marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| _ = viper.BindPFlag("log-file", rootCmd.PersistentFlags().Lookup("log-file")) | ||
| _ = viper.BindPFlag("enable-command-logging", rootCmd.PersistentFlags().Lookup("enable-command-logging")) | ||
| _ = viper.BindPFlag("export-translations", rootCmd.PersistentFlags().Lookup("export-translations")) | ||
| @@ -91,6 +92,7 @@ func initConfig() { | ||
| // Initialize Viper configuration | ||
| viper.SetEnvPrefix("github") | ||
| viper.AutomaticEnv() | ||
JoannaaKL marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| } | ||
| func main() { | ||