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

Function resolveWorkflowRoot

pkg/cli/fix_command.go:417–425  ·  view source on GitHub ↗
(filePath string)

Source from the content-addressed store, hash-verified

415}
416
417func resolveWorkflowRoot(filePath string) string {
418 clean := filepath.Clean(filePath)
419 needle := filepath.Join(".github", "workflows")
420 needleWithSep := needle + string(filepath.Separator)
421 if idx := strings.Index(clean, needleWithSep); idx >= 0 {
422 return clean[:idx+len(needle)]
423 }
424 return filepath.Dir(clean)
425}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected