1
1
mirror of https://github.com/go-gitea/gitea synced 2025-01-23 16:14:29 +00:00

revert unnecessary change

This commit is contained in:
Lunny Xiao 2024-08-21 20:17:07 -07:00
parent 9ea33761a6
commit bc1b2969ef
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A

View File

@ -128,13 +128,6 @@ func NewPullRequest(ctx context.Context, repo *repo_model.Repository, issue *iss
return err
}
if !pr.IsWorkInProgress(ctx) {
reviewNotifiers, err = issue_service.PullRequestCodeOwnersReview(ctx, issue, pr)
if err != nil {
return err
}
}
if pr.Flow == issues_model.PullRequestFlowGithub {
devLinks, err := issues_model.FindDevLinksByBranch(ctx, issue.RepoID, pr.HeadRepoID, pr.HeadBranch)
if err != nil {
@ -152,7 +145,6 @@ func NewPullRequest(ctx context.Context, repo *repo_model.Repository, issue *iss
}
}
// leave creating comment last
compareInfo, err := baseGitRepo.GetCompareInfo(pr.BaseRepo.RepoPath(),
git.BranchPrefix+pr.BaseBranch, pr.GetGitRefName(), false, false)
if err != nil {
@ -186,6 +178,13 @@ func NewPullRequest(ctx context.Context, repo *repo_model.Repository, issue *iss
return err
}
if !pr.IsWorkInProgress(ctx) {
reviewNotifiers, err = issue_service.PullRequestCodeOwnersReview(ctx, issue, pr)
if err != nil {
return err
}
}
return nil
}); err != nil {
// cleanup: this will only remove the reference, the real commit will be clean up when next GC