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

Function RenderCondition

pkg/workflow/expression_builder.go:444–446  ·  view source on GitHub ↗

RenderCondition optimises a ConditionNode and renders it to a string. Use this instead of calling node.Render() directly whenever the result will be used as an 'if:' condition in generated YAML.

(node ConditionNode)

Source from the content-addressed store, hash-verified

442// Use this instead of calling node.Render() directly whenever the result
443// will be used as an 'if:' condition in generated YAML.
444func RenderCondition(node ConditionNode) string {
445 return OptimizeExpression(node).Render()
446}
447
448// RenderConditionAsIf renders a ConditionNode as an 'if' condition with proper YAML indentation.
449// The condition is automatically optimised with OptimizeExpression before rendering.

Calls 2

OptimizeExpressionFunction · 0.85
RenderMethod · 0.65