Skip to content

Commit bc1b296

Browse files
committed
revert unnecessary change
1 parent 9ea3376 commit bc1b296

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

services/pull/pull.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,6 @@ func NewPullRequest(ctx context.Context, repo *repo_model.Repository, issue *iss
128128
return err
129129
}
130130

131-
if !pr.IsWorkInProgress(ctx) {
132-
reviewNotifiers, err = issue_service.PullRequestCodeOwnersReview(ctx, issue, pr)
133-
if err != nil {
134-
return err
135-
}
136-
}
137-
138131
if pr.Flow == issues_model.PullRequestFlowGithub {
139132
devLinks, err := issues_model.FindDevLinksByBranch(ctx, issue.RepoID, pr.HeadRepoID, pr.HeadBranch)
140133
if err != nil {
@@ -152,7 +145,6 @@ func NewPullRequest(ctx context.Context, repo *repo_model.Repository, issue *iss
152145
}
153146
}
154147

155-
// leave creating comment last
156148
compareInfo, err := baseGitRepo.GetCompareInfo(pr.BaseRepo.RepoPath(),
157149
git.BranchPrefix+pr.BaseBranch, pr.GetGitRefName(), false, false)
158150
if err != nil {
@@ -186,6 +178,13 @@ func NewPullRequest(ctx context.Context, repo *repo_model.Repository, issue *iss
186178
return err
187179
}
188180

181+
if !pr.IsWorkInProgress(ctx) {
182+
reviewNotifiers, err = issue_service.PullRequestCodeOwnersReview(ctx, issue, pr)
183+
if err != nil {
184+
return err
185+
}
186+
}
187+
189188
return nil
190189
}); err != nil {
191190
// cleanup: this will only remove the reference, the real commit will be clean up when next GC

0 commit comments

Comments
 (0)