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

Function templatableBoolEnvVarValue

pkg/workflow/templatables.go:226–235  ·  view source on GitHub ↗

templatableBoolEnvVarValue returns only staged values that must be preserved in env vars at runtime. Literal false is treated the same as unset, while literal true and GitHub Actions expressions must be propagated.

(value *TemplatableBool)

Source from the content-addressed store, hash-verified

224// in env vars at runtime. Literal false is treated the same as unset, while
225// literal true and GitHub Actions expressions must be propagated.
226func templatableBoolEnvVarValue(value *TemplatableBool) *string {
227 if value == nil {
228 return nil
229 }
230 s := value.String()
231 if s == "true" || isExpression(s) {
232 return &s
233 }
234 return nil
235}
236
237func resolveSafeOutputsStagedValue(trialMode bool, staged *TemplatableBool) *string {
238 if trialMode {

Callers 1

Calls 2

isExpressionFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected