getGitHubAllowedTools extracts the allowed tools list from GitHub tool configuration Returns the list of allowed tools, or nil if no allowed list is specified (which means all tools are allowed)
(githubTool map[string]any)
| 253 | // getGitHubAllowedTools extracts the allowed tools list from GitHub tool configuration |
| 254 | // Returns the list of allowed tools, or nil if no allowed list is specified (which means all tools are allowed) |
| 255 | func getGitHubAllowedTools(githubTool map[string]any) []string { |
| 256 | if allowedSetting, exists := githubTool["allowed"]; exists { |
| 257 | allowedTools, _ := parseGitHubAllowedToolsAndLimits(allowedSetting) |
| 258 | return allowedTools |
| 259 | } |
| 260 | return nil |
| 261 | } |
| 262 | |
| 263 | // parseGitHubAllowedToolsAndLimits parses tools.github.allowed entries. |
| 264 | // Supports string entries and object entries: |