0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-07-20 19:08:29 +02:00

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

Backport #34541 by @lunny

Fix #34320

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
Giteabot 2025-05-28 04:11:09 +08:00 committed by GitHub
parent eaaa158df3
commit 8965c068e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,