[BUG] Disable CODEOWNERS for forked repositories
- Disable the CODEOWNERS feature for forked repositories, as it would otherwise inadvertently request reviewers when for example a pull request is opened against a forked repository to propose changes to an existant pull request in the original repository. - Adds integration test. - Resolves #2525
This commit is contained in:
parent
9ce3068f36
commit
2658d4361e
2 changed files with 32 additions and 3 deletions
|
@ -891,6 +891,14 @@ func PullRequestCodeOwnersReview(ctx context.Context, pull *Issue, pr *PullReque
|
|||
return nil
|
||||
}
|
||||
|
||||
if err := pull.LoadRepo(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if pull.Repo.IsFork {
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := pr.LoadBaseRepo(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue