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

Function normalizeWorkflowID

pkg/cli/workflows.go:482–488  ·  view source on GitHub ↗

normalizeWorkflowID extracts the workflow ID from a workflow identifier. It handles both workflow IDs ("my-workflow") and full paths (".github/workflows/my-workflow.md"). Returns the workflow ID without .md or .lock.yml extension. Note: unlike stringutil.NormalizeWorkflowName (which operates on bar

(workflowIDOrPath string)

Source from the content-addressed store, hash-verified

480// Note: unlike stringutil.NormalizeWorkflowName (which operates on bare names),
481// this function also handles file system paths by extracting the basename first.
482func normalizeWorkflowID(workflowIDOrPath string) string {
483 // Get the base filename if it's a path
484 basename := filepath.Base(workflowIDOrPath)
485
486 // Remove .md or .lock.yml extension if present
487 return stringutil.NormalizeWorkflowName(basename)
488}
489
490// resolveWorkflowFile resolves a file or workflow name to an actual file path
491// Note: This function only looks for local workflows, not packages

Callers 15

parseGitHubURLFunction · 0.85
NewLogsCommandFunction · 0.85
expandLocalWildcardFunction · 0.85
RemoveWorkflowsFunction · 0.85
toggleWorkflowsByNamesFunction · 0.85
buildDeployPRMetadataFunction · 0.85
TestNormalizeWorkflowIDFunction · 0.85
findRunnableWorkflowsFunction · 0.85
ScanWorkflowsForMCPFunction · 0.85

Calls 1

NormalizeWorkflowNameFunction · 0.92

Tested by 1

TestNormalizeWorkflowIDFunction · 0.68