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

Function validateNotSelfReference

pkg/workflow/call_workflow_validation.go:80–85  ·  view source on GitHub ↗
(workflowName, currentWorkflowName string)

Source from the content-addressed store, hash-verified

78}
79
80func validateNotSelfReference(workflowName, currentWorkflowName string) error {
81 if workflowName == currentWorkflowName {
82 return fmt.Errorf("call-workflow: self-reference not allowed (workflow '%s' cannot call itself)\n\nA workflow cannot call itself to prevent infinite loops.\nUse a separate worker workflow for the task instead", workflowName)
83 }
84 return nil
85}
86
87func validateWorkflowFileExists(fileResult *findWorkflowFileResult, workflowName, workflowPath string) error {
88 if fileResult.mdExists || fileResult.lockExists || fileResult.ymlExists {

Callers 1

validateCallWorkflowMethod · 0.85

Calls 1

ErrorfMethod · 0.45

Tested by

no test coverage detected