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

Function GetAllScriptFilenames

pkg/workflow/script_registry.go:57–72  ·  view source on GitHub ↗

GetAllScriptFilenames returns a sorted list of all .cjs filenames from the JavaScript sources. This is used by the build system to discover which files need to be embedded in custom actions.

()

Source from the content-addressed store, hash-verified

55// GetAllScriptFilenames returns a sorted list of all .cjs filenames from the JavaScript sources.
56// This is used by the build system to discover which files need to be embedded in custom actions.
57func GetAllScriptFilenames() []string {
58 registryLog.Print("Getting all script filenames from JavaScript sources")
59 sources := GetJavaScriptSources()
60 filenames := make([]string, 0, len(sources))
61
62 for filename := range sources {
63 if strings.HasSuffix(filename, ".cjs") {
64 filenames = append(filenames, filename)
65 }
66 }
67
68 registryLog.Printf("Found %d .cjs files in JavaScript sources", len(filenames))
69
70 sort.Strings(filenames)
71 return filenames
72}

Calls 3

GetJavaScriptSourcesFunction · 0.85
PrintMethod · 0.80
PrintfMethod · 0.45