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

Function buildDetectionPassedCondition

pkg/workflow/expression_builder.go:283–291  ·  view source on GitHub ↗

buildDetectionPassedCondition builds the condition to check if the detection job either succeeded (no threats found) or was skipped (agent produced no outputs or patch — nothing to detect against). Use this for downstream jobs that must run in both cases.

()

Source from the content-addressed store, hash-verified

281// succeeded (no threats found) or was skipped (agent produced no outputs or patch — nothing
282// to detect against). Use this for downstream jobs that must run in both cases.
283func buildDetectionPassedCondition() ConditionNode {
284 return BuildOr(
285 buildDetectionSuccessCondition(),
286 BuildEquals(
287 BuildPropertyAccess(fmt.Sprintf("needs.%s.result", constants.DetectionJobName)),
288 BuildStringLiteral("skipped"),
289 ),
290 )
291}
292
293// Helper functions for building common GitHub Actions expression patterns
294

Callers 4

buildSafeJobsMethod · 0.85
buildUploadAssetsJobMethod · 0.85

Calls 5

BuildOrFunction · 0.85
BuildEqualsFunction · 0.85
BuildPropertyAccessFunction · 0.85
BuildStringLiteralFunction · 0.85

Tested by

no test coverage detected