1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-24 19:28:38 +00:00

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

Backport #30476 
Fix #30277
Caused by #29783
This commit is contained in:
Lunny Xiao
2024-04-16 08:27:01 +08:00
committed by GitHub
parent a0ca311165
commit 60181eb599
3 changed files with 37 additions and 5 deletions

View File

@@ -50,14 +50,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 := git.OpenRepository(ctx, pr.BaseRepo.RepoPath())
if err != nil {
return nil, err