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

Function extractLiteralEngineEnvHost

pkg/workflow/engine_api_targets.go:160–174  ·  view source on GitHub ↗
(workflowData *WorkflowData, envVar string)

Source from the content-addressed store, hash-verified

158}
159
160func extractLiteralEngineEnvHost(workflowData *WorkflowData, envVar string) string {
161 env := getEngineEnvOverrides(workflowData)
162 if env == nil {
163 return ""
164 }
165 rawValue, ok := env[envVar]
166 if !ok || rawValue == "" {
167 return ""
168 }
169 if strings.Contains(rawValue, "${{") {
170 awfHelpersLog.Printf("Skipping %s host extraction from GitHub expression value", envVar)
171 return ""
172 }
173 return extractAPITargetHost(workflowData, envVar)
174}
175
176// GetCopilotAllowlistTargets returns the Copilot-specific hosts that must be present in the
177// firewall allow-list for execution to succeed.

Callers 1

Calls 3

getEngineEnvOverridesFunction · 0.85
extractAPITargetHostFunction · 0.85
PrintfMethod · 0.45

Tested by

no test coverage detected