Skip to content

Commit e763fab

Browse files
authored
Fix pull request API field closed_at always being null (#22482)
Fix #22480
1 parent 9edf80f commit e763fab

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

services/convert/pull.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ func ToAPIPullRequest(ctx context.Context, pr *issues_model.PullRequest, doer *u
8888
},
8989
}
9090

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

0 commit comments

Comments
 (0)