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

Method GetActionPath

pkg/workflow/script_registry.go:34–49  ·  view source on GitHub ↗

GetActionPath retrieves the custom action path for a script, if registered. Returns an empty string if the script doesn't have a custom action path.

(name string)

Source from the content-addressed store, hash-verified

32// GetActionPath retrieves the custom action path for a script, if registered.
33// Returns an empty string if the script doesn't have a custom action path.
34func (r *ScriptRegistry) GetActionPath(name string) string {
35 r.mu.RLock()
36 defer r.mu.RUnlock()
37
38 entry, exists := r.scripts[name]
39 if !exists {
40 if registryLog.Enabled() {
41 registryLog.Printf("GetActionPath: script not found: %s", name)
42 }
43 return ""
44 }
45 if registryLog.Enabled() && entry.actionPath != "" {
46 registryLog.Printf("GetActionPath: returning action path for %s: %s", name, entry.actionPath)
47 }
48 return entry.actionPath
49}
50
51// DefaultScriptRegistry is the global script registry used by the workflow package.
52// Scripts are registered during package initialization via init() functions.

Callers 1

buildCustomActionStepMethod · 0.80

Calls 2

EnabledMethod · 0.45
PrintfMethod · 0.45

Tested by

no test coverage detected