From edad3970555e444a8d3e7f4700de9e058cd2df06 Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Fri, 22 Mar 2024 19:56:14 +0800 Subject: [PATCH] feat(cloudevents): fix not add the not runned steps in notificatioins (#101) Signed-off-by: wuhuizuo Signed-off-by: wuhuizuo --- cloudevents-server/pkg/events/custom/tekton/handler.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cloudevents-server/pkg/events/custom/tekton/handler.go b/cloudevents-server/pkg/events/custom/tekton/handler.go index 14f69b5..af57fb1 100644 --- a/cloudevents-server/pkg/events/custom/tekton/handler.go +++ b/cloudevents-server/pkg/events/custom/tekton/handler.go @@ -168,6 +168,9 @@ func getStepStatuses(status *v1beta1.TaskRunStatus) [][2]string { for _, s := range status.Steps { if s.Terminated != nil { ret = append(ret, [2]string{s.Name, s.Terminated.Reason}) + if s.Terminated.Reason != "Completed" { + break + } } }