Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small refactor for loading PRs #22652

Merged
merged 11 commits into from
Feb 2, 2023
1 change: 1 addition & 0 deletions models/issues/pull_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ func (prs PullRequestList) loadAttributes(ctx context.Context) error {
}
for i := range prs {
prs[i].Issue = set[prs[i].IssueID]
prs[i].Issue.PullRequest = prs[i] // if panic here, means issueIDs and prs are not in sync
lunny marked this conversation as resolved.
Show resolved Hide resolved
}
return nil
}
Expand Down
1 change: 0 additions & 1 deletion services/pull/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ func AddTestPullRequestTask(doer *user_model.User, repoID int64, branch string,
}
}

pr.Issue.PullRequest = pr
notification.NotifyPullRequestSynchronized(ctx, doer, pr)
}
}
Expand Down