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

Method parseUpdateIssuesConfig

pkg/workflow/update_issue.go:25–39  ·  view source on GitHub ↗

parseUpdateIssuesConfig handles update-issue configuration

(outputMap map[string]any)

Source from the content-addressed store, hash-verified

23
24// parseUpdateIssuesConfig handles update-issue configuration
25func (c *Compiler) parseUpdateIssuesConfig(outputMap map[string]any) *UpdateIssuesConfig {
26 updateIssueLog.Print("Parsing update-issue config")
27 return parseUpdateEntityConfigTyped(c, outputMap,
28 UpdateEntityIssue, "update-issue", updateIssueLog,
29 func(cfg *UpdateIssuesConfig) []UpdateEntityFieldSpec {
30 return []UpdateEntityFieldSpec{
31 {Name: "status", Mode: FieldParsingKeyExistence, Dest: &cfg.Status},
32 {Name: "title", Mode: FieldParsingKeyExistence, Dest: &cfg.Title},
33 {Name: "body", Mode: FieldParsingBoolValue, Dest: &cfg.Body},
34 {Name: "footer", Mode: FieldParsingTemplatableBool, StringDest: &cfg.Footer},
35 }
36 }, func(configMap map[string]any, cfg *UpdateIssuesConfig) {
37 cfg.TitlePrefix = extractStringFromMap(configMap, "title-prefix", updateIssueLog)
38 })
39}

Calls 3

extractStringFromMapFunction · 0.85
PrintMethod · 0.80