Skip to content

Commit 45bdeac

Browse files
authored
Fix pull request API field closed_at always being null (#22482) (#22483)
Backport #22482 Fix #22480
1 parent a32700d commit 45bdeac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/convert/pull.go

+4
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ func ToAPIPullRequest(ctx context.Context, pr *issues_model.PullRequest, doer *u
8989
},
9090
}
9191

92+
if pr.Issue.ClosedUnix != 0 {
93+
apiPullRequest.Closed = pr.Issue.ClosedUnix.AsTimePtr()
94+
}
95+
9296
gitRepo, err := git.OpenRepository(ctx, pr.BaseRepo.RepoPath())
9397
if err != nil {
9498
log.Error("OpenRepository[%s]: %v", pr.BaseRepo.RepoPath(), err)

0 commit comments

Comments
 (0)