1
1
mirror of https://github.com/go-gitea/gitea synced 2025-11-15 10:48:11 +00:00

Fix code owners will not be mentioned when a pull request comes from a forked repository (#30476) (#30496)

Backport #30476 by @lunny

Fix #30277
Caused by #29783

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
Giteabot
2024-04-16 01:08:16 +08:00
committed by GitHub
parent 7ffc0acc42
commit 3d31b5963e
3 changed files with 38 additions and 5 deletions

View File

@@ -51,14 +51,14 @@ func PullRequestCodeOwnersReview(ctx context.Context, issue *issues_model.Issue,
return nil, err
}
if pr.HeadRepo.IsFork {
return nil, nil
}
if err := pr.LoadBaseRepo(ctx); err != nil {
return nil, err
}
if pr.BaseRepo.IsFork {
return nil, nil
}
repo, err := gitrepo.OpenRepository(ctx, pr.BaseRepo)
if err != nil {
return nil, err