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

Function detectFromCustomSteps

pkg/workflow/runtime_detection.go:122–136  ·  view source on GitHub ↗

detectFromCustomSteps scans custom steps YAML for runtime commands

(customSteps string, requirements map[string]*RuntimeRequirement)

Source from the content-addressed store, hash-verified

120
121// detectFromCustomSteps scans custom steps YAML for runtime commands
122func detectFromCustomSteps(customSteps string, requirements map[string]*RuntimeRequirement) {
123 workflowLog.Print("Scanning custom steps for runtime commands")
124 lines := strings.SplitSeq(customSteps, "\n")
125 for line := range lines {
126 // Look for run: commands
127 if strings.Contains(line, "run:") {
128 // Extract the command part
129 parts := strings.SplitN(line, "run:", 2)
130 if len(parts) == 2 {
131 cmdLine := strings.TrimSpace(parts[1])
132 detectRuntimeFromCommand(cmdLine, requirements)
133 }
134 }
135 }
136}
137
138// detectRuntimeFromCommand scans a command string for runtime indicators
139func detectRuntimeFromCommand(cmdLine string, requirements map[string]*RuntimeRequirement) {

Callers 2

Calls 2

detectRuntimeFromCommandFunction · 0.85
PrintMethod · 0.80

Tested by 1