Browse Source

Fix possible nil description of pull request when migrating from CodeCommit (#34541)

Fix #34320
pull/34544/head
Lunny Xiao 7 months ago committed by GitHub
parent
commit
24a51059d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      services/migrations/codecommit.go

6
services/migrations/codecommit.go

@ -180,11 +180,15 @@ func (c *CodeCommitDownloader) GetPullRequests(ctx context.Context, page, perPag @@ -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,

Loading…
Cancel
Save