mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-29 14:07:49 +01:00
Fix pull request API field closed_at
always being null
(#22482)
Fix #22480
This commit is contained in:
parent
9edf80f472
commit
e763fab685
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue