From ecacba3b75fbce6c02238be86df292fd997f684b Mon Sep 17 00:00:00 2001 From: sg Date: Fri, 25 Oct 2024 11:50:07 +0100 Subject: [PATCH] nit: set the default annotation of the custom annotation enricher to the empty map so that it doesn't crash if its run as a noop --- components/enrichers/custom-annotation/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/enrichers/custom-annotation/main.go b/components/enrichers/custom-annotation/main.go index 066f1e3af..cbdecfcb5 100644 --- a/components/enrichers/custom-annotation/main.go +++ b/components/enrichers/custom-annotation/main.go @@ -69,9 +69,8 @@ func run(name, annotations string) error { } func main() { - flag.StringVar(&annotations, "annotations", enrichers.LookupEnvOrString("ANNOTATIONS", ""), "what are the annotations this enricher will add to the issues") + flag.StringVar(&annotations, "annotations", enrichers.LookupEnvOrString("ANNOTATIONS", "{}"), "what are the annotations this enricher will add to the issues") flag.StringVar(&name, "annotation-name", enrichers.LookupEnvOrString("NAME", defaultName), "what is the name this enricher will masquerade as") - if err := enrichers.ParseFlags(); err != nil { log.Fatal(err) }