From f5752108469d49ce4c3119ec68b790d825fca9de Mon Sep 17 00:00:00 2001 From: sg Date: Fri, 18 Oct 2024 11:12:42 +0100 Subject: [PATCH] nit: improve logging for the custom annotation enricher and adjust the name of its parameter in the example --- components/enrichers/custom-annotation/main.go | 2 +- .../custom-annotations-enricher-project/pipelinerun.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/enrichers/custom-annotation/main.go b/components/enrichers/custom-annotation/main.go index e925f5a8e..62efb23b2 100644 --- a/components/enrichers/custom-annotation/main.go +++ b/components/enrichers/custom-annotation/main.go @@ -28,7 +28,7 @@ func enrichIssue(i *apiv1.Issue, annotations string) (*apiv1.EnrichedIssue, erro enrichedIssue := apiv1.EnrichedIssue{} annotationMap := map[string]string{} if err := json.Unmarshal([]byte(annotations), &annotationMap); err != nil { - return nil, errors.Errorf("could not unmarshall annotation object %s to map[string]string, err: %w", annotations, err) + return nil, errors.Errorf("could not unmarshall annotation object '%s' to map[string]string, err: %w", annotations, err) } enrichedIssue = apiv1.EnrichedIssue{ RawIssue: i, diff --git a/examples/pipelines/custom-annotations-enricher-project/pipelinerun.yaml b/examples/pipelines/custom-annotations-enricher-project/pipelinerun.yaml index 1b27d8c8c..5c8d2acef 100644 --- a/examples/pipelines/custom-annotations-enricher-project/pipelinerun.yaml +++ b/examples/pipelines/custom-annotations-enricher-project/pipelinerun.yaml @@ -9,7 +9,7 @@ spec: params: - name: git-clone-url value: https://github.com/sqreen/go-dvwa.git - - name: enricher-custom-annotation-annotations + - name: enricher-custom-annotation-base-annotation value: | {"foo":"bar", "a":"b",