diff options
author | Yarden Shoham <hrsi88@gmail.com> | 2023-01-17 13:42:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-17 11:42:32 +0000 |
commit | e763fab6851c278150a02c983e739a37e17ce988 (patch) | |
tree | e307d645d84c624df9eb67f7e76f58ce60b01786 /services/convert | |
parent | 9edf80f472e9307d89cab1c22e7c0c185a50deb7 (diff) | |
download | gitea-e763fab6851c278150a02c983e739a37e17ce988.tar.gz gitea-e763fab6851c278150a02c983e739a37e17ce988.zip |
Fix pull request API field `closed_at` always being `null` (#22482)
Fix #22480
Diffstat (limited to 'services/convert')
-rw-r--r-- | services/convert/pull.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/convert/pull.go b/services/convert/pull.go index db0add6cde..cdf72e7805 100644 --- a/services/convert/pull.go +++ b/services/convert/pull.go @@ -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) |