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

Function addSourceToWorkflow

pkg/cli/add_workflow_compilation.go:171–174  ·  view source on GitHub ↗

This function preserves the existing frontmatter formatting while adding the source field.

(content, source string)

Source from the content-addressed store, hash-verified

169
170// This function preserves the existing frontmatter formatting while adding the source field.
171func addSourceToWorkflow(content, source string) (string, error) {
172 // Use shared frontmatter logic that preserves formatting
173 return addFieldToFrontmatter(content, "source", source, false)
174}
175
176// addEngineToWorkflow adds or updates the engine field in the workflow's frontmatter.
177// This function preserves the existing frontmatter formatting while setting the engine field.

Calls 1

addFieldToFrontmatterFunction · 0.85

Tested by 4

TestAddSourceToWorkflowFunction · 0.68
TestAddEngineToWorkflowFunction · 0.68
TestFormatPreservationFunction · 0.68