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

Function recompileWorkflow

pkg/cli/run_push.go:135–164  ·  view source on GitHub ↗

recompileWorkflow compiles a workflow using CompileWorkflows

(ctx context.Context, workflowPath string, verbose bool, approve bool)

Source from the content-addressed store, hash-verified

133
134// recompileWorkflow compiles a workflow using CompileWorkflows
135func recompileWorkflow(ctx context.Context, workflowPath string, verbose bool, approve bool) error {
136 runPushLog.Printf("Recompiling workflow: %s", workflowPath)
137
138 config := CompileConfig{
139 MarkdownFiles: []string{workflowPath},
140 Verbose: verbose,
141 EngineOverride: "",
142 Validate: true,
143 Watch: false,
144 WorkflowDir: "",
145 SkipInstructions: false,
146 NoEmit: false,
147 Purge: false,
148 TrialMode: false,
149 TrialLogicalRepoSlug: "",
150 Strict: false,
151 Approve: approve,
152 }
153
154 runPushLog.Printf("Compilation config: Validate=%v, NoEmit=%v", config.Validate, config.NoEmit)
155
156 runPushLog.Printf("Starting compilation with CompileWorkflows")
157 if _, err := CompileWorkflows(ctx, config); err != nil {
158 runPushLog.Printf("Compilation failed: %v", err)
159 return fmt.Errorf("compilation failed: %w", err)
160 }
161
162 runPushLog.Printf("Successfully recompiled workflow: %s", workflowPath)
163 return nil
164}
165
166// checkLockFileStatus checks if a lock file is missing or outdated and returns status info.
167// Note: This is used for display/warning purposes only. The actual compilation decision

Callers 1

collectWorkflowFilesFunction · 0.85

Calls 3

CompileWorkflowsFunction · 0.85
PrintfMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected