(fileResult *findWorkflowFileResult, workflowName, workflowPath string)
| 85 | } |
| 86 | |
| 87 | func 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 | |
| 98 | func validateWorkflowSupportsCallTrigger(workflowName string, fileResult *findWorkflowFileResult) error { |
| 99 | if fileResult.lockExists { |
no test coverage detected