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

Function validateWorkflowFileExists

pkg/workflow/call_workflow_validation.go:87–96  ·  view source on GitHub ↗
(fileResult *findWorkflowFileResult, workflowName, workflowPath string)

Source from the content-addressed store, hash-verified

85}
86
87func validateWorkflowFileExists(fileResult *findWorkflowFileResult, workflowName, workflowPath string) error {
88 if fileResult.mdExists || fileResult.lockExists || fileResult.ymlExists {
89 return nil
90 }
91 currentDir := filepath.Dir(workflowPath)
92 githubDir := filepath.Dir(currentDir)
93 repoRoot := filepath.Dir(githubDir)
94 workflowsDir := filepath.Join(repoRoot, constants.GetWorkflowDir())
95 return fmt.Errorf("call-workflow: workflow '%s' not found in %s\n\nChecked for: %s.md, %s.lock.yml, %s.yml\n\nTo fix:\n1. Verify the workflow file exists in %s/\n2. Ensure the filename matches exactly (case-sensitive)\n3. Use the filename without extension in your configuration", workflowName, workflowsDir, workflowName, workflowName, workflowName, workflowsDir)
96}
97
98func validateWorkflowSupportsCallTrigger(workflowName string, fileResult *findWorkflowFileResult) error {
99 if fileResult.lockExists {

Callers 1

validateCallWorkflowMethod · 0.85

Calls 2

GetWorkflowDirFunction · 0.92
ErrorfMethod · 0.45

Tested by

no test coverage detected