parseUpdateIssuesConfig handles update-issue configuration
(outputMap map[string]any)
| 23 | |
| 24 | // parseUpdateIssuesConfig handles update-issue configuration |
| 25 | func (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 | } |