From 6b3c8f0ef521fb1552670bc26e029ed8634399d2 Mon Sep 17 00:00:00 2001 From: Rail Aliiev Date: Mon, 28 Mar 2022 12:55:49 -0400 Subject: [PATCH] CreatedAt is not always set --- pkg/cmd/release/github.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/release/github.go b/pkg/cmd/release/github.go index 86d71d716430..7bc790182a26 100644 --- a/pkg/cmd/release/github.go +++ b/pkg/cmd/release/github.go @@ -152,8 +152,10 @@ func (c *githubClientImpl) issueEvents(issueNum int) ([]githubEvent, error) { } for _, event := range events { detail := githubEvent{ - CreatedAt: *event.CreatedAt, - Event: *event.Event, + Event: *event.Event, + } + if event.CreatedAt != nil { + detail.CreatedAt = *event.CreatedAt } if event.ProjectCard != nil && event.ProjectCard.ProjectID != nil { project, _, err := c.client.Projects.GetProject(c.ctx, *event.ProjectCard.ProjectID)