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

Function ExtractWorkflowDescription

pkg/cli/packages.go:194–207  ·  view source on GitHub ↗

ExtractWorkflowDescription extracts the description field from workflow content string

(content string)

Source from the content-addressed store, hash-verified

192
193// ExtractWorkflowDescription extracts the description field from workflow content string
194func ExtractWorkflowDescription(content string) string {
195 result, err := parser.ExtractFrontmatterFromContent(content)
196 if err != nil {
197 return ""
198 }
199
200 if desc, ok := result.Frontmatter["description"]; ok {
201 if descStr, ok := desc.(string); ok {
202 return descStr
203 }
204 }
205
206 return ""
207}
208
209// ExtractWorkflowEngine extracts the engine field from workflow content string.
210// Supports both string format (engine: copilot) and nested format (engine: { id: copilot }).

Calls 1