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

Method GetRequiredSecretNames

pkg/workflow/gemini_engine.go:48–71  ·  view source on GitHub ↗

GetRequiredSecretNames returns the list of secrets required by the Gemini engine This includes GEMINI_API_KEY and optionally MCP_GATEWAY_API_KEY, GITHUB_MCP_SERVER_TOKEN, HTTP MCP header secrets, and mcp-scripts secrets

(workflowData *WorkflowData)

Source from the content-addressed store, hash-verified

46// This includes GEMINI_API_KEY and optionally MCP_GATEWAY_API_KEY, GITHUB_MCP_SERVER_TOKEN,
47// HTTP MCP header secrets, and mcp-scripts secrets
48func (e *GeminiEngine) GetRequiredSecretNames(workflowData *WorkflowData) []string {
49 geminiLog.Print("Collecting required secrets for Gemini engine")
50 secrets := []string{"GEMINI_API_KEY"}
51
52 // Add common MCP secrets (MCP_GATEWAY_API_KEY if MCP servers present, mcp-scripts secrets)
53 secrets = append(secrets, collectCommonMCPSecrets(workflowData)...)
54
55 // Add GitHub token for GitHub MCP server if present
56 if hasGitHubTool(workflowData.ParsedTools) {
57 geminiLog.Print("Adding GITHUB_MCP_SERVER_TOKEN secret")
58 secrets = append(secrets, "GITHUB_MCP_SERVER_TOKEN")
59 }
60
61 // Add HTTP MCP header secret names
62 headerSecrets := collectHTTPMCPHeaderSecrets(workflowData.Tools)
63 for varName := range headerSecrets {
64 secrets = append(secrets, varName)
65 }
66 if len(headerSecrets) > 0 {
67 geminiLog.Printf("Added %d HTTP MCP header secrets", len(headerSecrets))
68 }
69
70 return secrets
71}
72
73// GetSupportedEnvVarKeys returns the engine.env variable names that the Gemini engine
74// supports as defined in the AWF specification.

Callers 2

TestGeminiEngineFunction · 0.95
GetExecutionStepsMethod · 0.95

Calls 5

collectCommonMCPSecretsFunction · 0.85
hasGitHubToolFunction · 0.85
PrintMethod · 0.80
PrintfMethod · 0.45

Tested by 1

TestGeminiEngineFunction · 0.76