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

Function formatInputNameAsEnvVar

pkg/workflow/secret_extraction.go:306–316  ·  view source on GitHub ↗
(inputName string)

Source from the content-addressed store, hash-verified

304}
305
306func formatInputNameAsEnvVar(inputName string) string {
307 normalized := strings.Map(func(r rune) rune {
308 switch {
309 case (r >= 'A' && r <= 'Z') || (r >= 'a' && r <= 'z') || (r >= '0' && r <= '9'):
310 return r
311 default:
312 return '_'
313 }
314 }, inputName)
315 return "GH_AW_INPUT_" + strings.ToUpper(normalized)
316}
317
318// ReplaceTemplateExpressionsWithEnvVars replaces all template expressions with environment variable references
319// Handles: secrets.*, env.*, and github.workspace

Calls

no outgoing calls

Tested by 1