hasToolsGithubMap returns true if frontmatter has tools.github as a map (not just true/false).
(frontmatter map[string]any)
| 89 | |
| 90 | // hasToolsGithubMap returns true if frontmatter has tools.github as a map (not just true/false). |
| 91 | func hasToolsGithubMap(frontmatter map[string]any) bool { |
| 92 | toolsAny, hasTools := frontmatter["tools"] |
| 93 | if !hasTools { |
| 94 | return false |
| 95 | } |
| 96 | toolsMap, ok := toolsAny.(map[string]any) |
| 97 | if !ok { |
| 98 | return false |
| 99 | } |
| 100 | githubAny, hasGitHub := toolsMap["github"] |
| 101 | if !hasGitHub { |
| 102 | return false |
| 103 | } |
| 104 | _, ok = githubAny.(map[string]any) |
| 105 | return ok |
| 106 | } |
| 107 | |
| 108 | // addIntegrityProxyFalseToToolsGitHub inserts 'integrity-proxy: false' inside the |
| 109 | // tools.github block. The line is inserted immediately after the 'github:' key line. |
no outgoing calls
no test coverage detected