MCPcopy Index your code
hub / github.com/github/gh-aw / Error

Method Error

pkg/workflow/workflow_errors.go:299–322  ·  view source on GitHub ↗

Error implements the error interface Returns a formatted info message explaining that this is a shared workflow

()

Source from the content-addressed store, hash-verified

297// Error implements the error interface
298// Returns a formatted info message explaining that this is a shared workflow
299func (e *SharedWorkflowError) Error() string {
300 if sharedWorkflowLog.Enabled() {
301 sharedWorkflowLog.Printf("Formatting info message for shared workflow: %s", e.Path)
302 }
303
304 filename := filepath.Base(e.Path)
305
306 return fmt.Sprintf(
307 "ℹ️ Shared agentic workflow detected: %s\n\n"+
308 "This workflow is missing the 'on' field and will be treated as a shared workflow component.\n"+
309 "Shared workflows are reusable components meant to be imported by other workflows.\n\n"+
310 "To use this shared workflow:\n"+
311 " 1. Import it in another workflow's frontmatter:\n"+
312 " ---\n"+
313 " on: issues\n"+
314 " imports:\n"+
315 " - %s\n"+
316 " ---\n\n"+
317 " 2. Compile the workflow that imports it\n\n"+
318 "Skipping compilation.",
319 filename,
320 e.Path,
321 )
322}
323
324// IsSharedWorkflow returns true, indicating this is a shared workflow
325func (e *SharedWorkflowError) IsSharedWorkflow() bool {

Calls 2

EnabledMethod · 0.45
PrintfMethod · 0.45