Fix pull request API field closed_at always being null (#22482)

Fix #22480
此提交包含在:
Yarden Shoham
2023-01-17 11:42:32 +00:00
提交者 GitHub
父節點 9edf80f472
當前提交 e763fab685
+4
查看文件
@@ -88,6 +88,10 @@ func ToAPIPullRequest(ctx context.Context, pr *issues_model.PullRequest, doer *u
},
}
if pr.Issue.ClosedUnix != 0 {
apiPullRequest.Closed = pr.Issue.ClosedUnix.AsTimePtr()
}
gitRepo, err := git.OpenRepository(ctx, pr.BaseRepo.RepoPath())
if err != nil {
log.Error("OpenRepository[%s]: %v", pr.BaseRepo.RepoPath(), err)