From 8965c068e9f96901dfe43e8abf17cca4d71c14de Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 28 May 2025 04:11:09 +0800 Subject: [PATCH] Fix possible nil description of pull request when migrating from CodeCommit (#34541) (#34550) Backport #34541 by @lunny Fix #34320 Co-authored-by: Lunny Xiao --- services/migrations/codecommit.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/migrations/codecommit.go b/services/migrations/codecommit.go index 4b2634ef8a..8b79edc4e5 100644 --- a/services/migrations/codecommit.go +++ b/services/migrations/codecommit.go @@ -180,11 +180,15 @@ func (c *CodeCommitDownloader) GetPullRequests(ctx context.Context, page, perPag continue } target := orig.PullRequestTargets[0] + description := "" + if orig.Description != nil { + description = *orig.Description + } pr := &base.PullRequest{ Number: number, Title: *orig.Title, PosterName: c.getUsernameFromARN(*orig.AuthorArn), - Content: *orig.Description, + Content: description, State: "open", Created: *orig.CreationDate, Updated: *orig.LastActivityDate,