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

Function BuildDefaultSecretValidationStep

pkg/workflow/engine_helpers.go:232–242  ·  view source on GitHub ↗

BuildDefaultSecretValidationStep returns a secret validation step for the given engine configuration, or an empty step when a custom command is specified. This consolidates the common guard+delegate pattern shared across all engine GetSecretValidationStep implementations. Parameters: - workflowData

(workflowData *WorkflowData, secrets []string, name, docsURL string)

Source from the content-addressed store, hash-verified

230// Returns:
231// - GitHubActionStep: The validation step, or an empty step if a custom command is set
232func BuildDefaultSecretValidationStep(workflowData *WorkflowData, secrets []string, name, docsURL string) GitHubActionStep {
233 if workflowData != nil && workflowData.EngineConfig != nil && workflowData.EngineConfig.Command != "" {
234 engineHelpersLog.Printf("Skipping secret validation step: custom command specified (%s)", workflowData.EngineConfig.Command)
235 return GitHubActionStep{}
236 }
237 if workflowData != nil && strings.TrimSpace(workflowData.Environment) != "" {
238 engineHelpersLog.Print("Skipping secret validation step: top-level environment is configured")
239 return GitHubActionStep{}
240 }
241 return GenerateMultiSecretValidationStep(secrets, name, docsURL, getEngineEnvOverrides(workflowData))
242}
243
244// collectCommonMCPSecrets returns the MCP-related secret names shared across all engines:
245// - MCP_GATEWAY_API_KEY (when MCP servers are present)

Calls 4

getEngineEnvOverridesFunction · 0.85
PrintMethod · 0.80
PrintfMethod · 0.45