From b9f617c0da6cac5192167afd0f36eb92c20e7053 Mon Sep 17 00:00:00 2001 From: David Calavera Date: Mon, 7 Feb 2022 19:23:36 -0800 Subject: [PATCH] Omit CodePipelineEventDetailType when it's missing in the payload The examples in testdata don't include this field, so I'm guessing it's optional. --- events/codepipeline_cloudwatch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/events/codepipeline_cloudwatch.go b/events/codepipeline_cloudwatch.go index e51fea12..591e39d7 100644 --- a/events/codepipeline_cloudwatch.go +++ b/events/codepipeline_cloudwatch.go @@ -92,7 +92,7 @@ type CodePipelineEventDetail struct { Region string `json:"region"` - Type CodePipelineEventDetailType `json:"type"` + Type CodePipelineEventDetailType `json:"type,omitempty"` } type CodePipelineEventDetailType struct {