MCPcopy Index your code
hub / github.com/cli/cli / GetSecretApp

Function GetSecretApp

pkg/cmd/secret/shared/shared.go:66–84  ·  view source on GitHub ↗
(app string, entity SecretEntity)

Source from the content-addressed store, hash-verified

64}
65
66func GetSecretApp(app string, entity SecretEntity) (App, error) {
67 switch strings.ToLower(app) {
68 case Actions:
69 return Actions, nil
70 case Agents:
71 return Agents, nil
72 case Codespaces:
73 return Codespaces, nil
74 case Dependabot:
75 return Dependabot, nil
76 case "":
77 if entity == User {
78 return Codespaces, nil
79 }
80 return Actions, nil
81 default:
82 return Unknown, fmt.Errorf("invalid application: %s", app)
83 }
84}
85
86func IsSupportedSecretEntity(app App, entity SecretEntity) bool {
87 switch app {

Callers 4

removeRunFunction · 0.92
listRunFunction · 0.92
setRunFunction · 0.92
TestGetSecretAppFunction · 0.85

Calls 1

ErrorfMethod · 0.65

Tested by 1

TestGetSecretAppFunction · 0.68