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

Function isBoolLiteral

pkg/workflow/expression_optimizer.go:82–85  ·  view source on GitHub ↗

--- helper predicates ------------------------------------------------------- isBoolLiteral returns true when node is a BooleanLiteralNode with the given value.

(node ConditionNode, value bool)

Source from the content-addressed store, hash-verified

80
81// isBoolLiteral returns true when node is a BooleanLiteralNode with the given value.
82func isBoolLiteral(node ConditionNode, value bool) bool {
83 lit, ok := node.(*BooleanLiteralNode)
84 return ok && lit.Value == value
85}
86
87// isStatusFunc returns true when node is a call to one of the GitHub Actions
88// status-check functions: always(), success(), failure(), cancelled().

Callers 4

optimizeAndNodeFunction · 0.85
optimizeOrNodeFunction · 0.85
optimizeDisjunctionNodeFunction · 0.85
TestIsBoolLiteralFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsBoolLiteralFunction · 0.68