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

Method parseRemoveLabelsConfig

pkg/workflow/remove_labels.go:18–29  ·  view source on GitHub ↗

parseRemoveLabelsConfig handles remove-labels configuration

(outputMap map[string]any)

Source from the content-addressed store, hash-verified

16
17// parseRemoveLabelsConfig handles remove-labels configuration
18func (c *Compiler) parseRemoveLabelsConfig(outputMap map[string]any) *RemoveLabelsConfig {
19 config := parseConfigScaffold(outputMap, "remove-labels", removeLabelsLog, func(err error) *RemoveLabelsConfig {
20 removeLabelsLog.Printf("Failed to unmarshal config: %v", err)
21 // Handle null case: create empty config (allows any labels)
22 removeLabelsLog.Print("Using empty configuration (allows any labels)")
23 return &RemoveLabelsConfig{}
24 })
25 if config != nil {
26 removeLabelsLog.Printf("Parsed configuration: allowed_count=%d, blocked_count=%d, target=%s", len(config.Allowed), len(config.Blocked), config.Target)
27 }
28 return config
29}

Callers 1

Calls 3

parseConfigScaffoldFunction · 0.85
PrintMethod · 0.80
PrintfMethod · 0.45

Tested by

no test coverage detected