Skip to content

Commit 24a5105

Browse files
authored
Fix possible nil description of pull request when migrating from CodeCommit (#34541)
Fix #34320
1 parent 9f10885 commit 24a5105

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

services/migrations/codecommit.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,15 @@ func (c *CodeCommitDownloader) GetPullRequests(ctx context.Context, page, perPag
180180
continue
181181
}
182182
target := orig.PullRequestTargets[0]
183+
description := ""
184+
if orig.Description != nil {
185+
description = *orig.Description
186+
}
183187
pr := &base.PullRequest{
184188
Number: number,
185189
Title: *orig.Title,
186190
PosterName: c.getUsernameFromARN(*orig.AuthorArn),
187-
Content: *orig.Description,
191+
Content: description,
188192
State: "open",
189193
Created: *orig.CreationDate,
190194
Updated: *orig.LastActivityDate,

0 commit comments

Comments
 (0)