Skip to content

Commit b3ef825

Browse files
committed
add ff saupport and consolidated actions toolsets
1 parent 6572d38 commit b3ef825

File tree

4 files changed

+1010
-19
lines changed

4 files changed

+1010
-19
lines changed

cmd/github-mcp-server/main.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,18 @@ var (
5454

5555
// Parse tools (similar to toolsets)
5656
var enabledTools []string
57-
if err := viper.UnmarshalKey("tools", &enabledTools); err != nil {
58-
return fmt.Errorf("failed to unmarshal tools: %w", err)
57+
if viper.IsSet("tools") {
58+
if err := viper.UnmarshalKey("tools", &enabledTools); err != nil {
59+
return fmt.Errorf("failed to unmarshal tools: %w", err)
60+
}
5961
}
6062

6163
// Parse enabled features (similar to toolsets)
6264
var enabledFeatures []string
63-
if err := viper.UnmarshalKey("features", &enabledFeatures); err != nil {
64-
return fmt.Errorf("failed to unmarshal features: %w", err)
65+
if viper.IsSet("features") {
66+
if err := viper.UnmarshalKey("features", &enabledFeatures); err != nil {
67+
return fmt.Errorf("failed to unmarshal features: %w", err)
68+
}
6569
}
6670

6771
ttl := viper.GetDuration("repo-access-cache-ttl")

0 commit comments

Comments
 (0)