Set PR for issue when load attributes for PRs (#22766)

A missing patch for #22650.
This commit is contained in:
Jason Song 2023-02-05 22:24:43 +08:00 committed by GitHub
parent c18a62279a
commit d74d16a4b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -187,6 +187,7 @@ func (prs PullRequestList) loadAttributes(ctx context.Context) error {
if pr.Issue == nil {
return fmt.Errorf("issues and prs may be not in sync: cannot find issue %v for pr %v: %w", pr.IssueID, pr.ID, util.ErrNotExist)
}
pr.Issue.PullRequest = pr
}
return nil
}