(workflowSpec *WorkflowSpec, sourceContent []byte, opts AddOptions)
| 377 | } |
| 378 | |
| 379 | func reportAddWorkflowStart(workflowSpec *WorkflowSpec, sourceContent []byte, opts AddOptions) { |
| 380 | addLog.Printf("Adding workflow: name=%s, content_size=%d bytes", workflowSpec.WorkflowName, len(sourceContent)) |
| 381 | if !opts.Verbose { |
| 382 | return |
| 383 | } |
| 384 | fmt.Fprintln(os.Stderr, console.FormatInfoMessage("Adding workflow: "+workflowSpec.String())) |
| 385 | if opts.Force { |
| 386 | fmt.Fprintln(os.Stderr, console.FormatInfoMessage("Force flag enabled: will overwrite existing files")) |
| 387 | } |
| 388 | fmt.Fprintln(os.Stderr, console.FormatSuccessMessage(fmt.Sprintf("Using pre-fetched workflow content (%d bytes)", len(sourceContent)))) |
| 389 | } |
| 390 | |
| 391 | func validateWorkflowDestination(githubWorkflowsDir, workflowName string, opts AddOptions) (bool, error) { |
| 392 | existingFile := filepath.Join(githubWorkflowsDir, workflowName+".md") |
no test coverage detected