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

Function installStepsContainNodeSetup

pkg/workflow/nodejs.go:32–39  ·  view source on GitHub ↗

installStepsContainNodeSetup reports whether any of the provided steps is already a "Setup Node.js" step. Uses the same extractStepName matcher as JobManager.ValidateDuplicateSteps so the guard cannot drift from what the validator would flag as a duplicate.

(steps []GitHubActionStep)

Source from the content-addressed store, hash-verified

30// JobManager.ValidateDuplicateSteps so the guard cannot drift from what the
31// validator would flag as a duplicate.
32func installStepsContainNodeSetup(steps []GitHubActionStep) bool {
33 for _, step := range steps {
34 if extractStepName(strings.Join(step, "\n")) == "Setup Node.js" {
35 return true
36 }
37 }
38 return false
39}
40
41// By default, --ignore-scripts is added to the install command to prevent pre/post install
42// scripts from executing (supply chain security). Pass runInstallScripts=true to allow scripts.

Calls 1

extractStepNameFunction · 0.85

Tested by 1