Browse Source

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

Backport #22482

Fix #22480
tags/v1.18.1
Yarden Shoham 1 year ago
parent
commit
45bdeac730
No account linked to committer's email address
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      modules/convert/pull.go

+ 4
- 0
modules/convert/pull.go View File

@@ -89,6 +89,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…
Cancel
Save