MCPcopy Create free account
hub / github.com/github/gh-aw / hasToolsGitHubMode

Function hasToolsGitHubMode

pkg/cli/codemod_cli_proxy_mode.go:59–78  ·  view source on GitHub ↗
(frontmatter map[string]any)

Source from the content-addressed store, hash-verified

57}
58
59func hasToolsGitHubMode(frontmatter map[string]any) bool {
60 toolsAny, hasTools := frontmatter["tools"]
61 if !hasTools {
62 return false
63 }
64 toolsMap, ok := toolsAny.(map[string]any)
65 if !ok {
66 return false
67 }
68 githubAny, hasGitHub := toolsMap["github"]
69 if !hasGitHub {
70 return false
71 }
72 githubMap, ok := githubAny.(map[string]any)
73 if !ok {
74 return false
75 }
76 _, hasMode := githubMap["mode"]
77 return hasMode
78}
79
80func addGitHubModeGhProxyToTools(lines []string) []string {
81 toolsLine := -1

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected