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

Function containsDeprecatedGitHubAppID

pkg/cli/codemod_github_app_client_id.go:37–56  ·  view source on GitHub ↗
(value any)

Source from the content-addressed store, hash-verified

35}
36
37func containsDeprecatedGitHubAppID(value any) bool {
38 switch v := value.(type) {
39 case map[string]any:
40 for key, child := range v {
41 if key == "github-app" {
42 if appMap, ok := child.(map[string]any); ok {
43 if _, hasAppID := appMap["app-id"]; hasAppID {
44 return true
45 }
46 }
47 }
48 if containsDeprecatedGitHubAppID(child) {
49 return true
50 }
51 }
52 case []any:
53 return slices.ContainsFunc(v, containsDeprecatedGitHubAppID)
54 }
55 return false
56}
57
58func renameGitHubAppIDToClientID(lines []string) ([]string, bool) {
59 result := make([]string, 0, len(lines))

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected