diff --git a/src/applications/owners/query/PhabricatorOwnersPackageQuery.php b/src/applications/owners/query/PhabricatorOwnersPackageQuery.php index f57ddf5a58..ef6a1e1a67 100644 --- a/src/applications/owners/query/PhabricatorOwnersPackageQuery.php +++ b/src/applications/owners/query/PhabricatorOwnersPackageQuery.php @@ -372,6 +372,11 @@ final class PhabricatorOwnersPackageQuery $include = false; foreach ($package->getPaths() as $package_path) { + if ($package_path->getRepositoryPHID() != $repository_phid) { + // If this path is for some other repository, skip it. + continue; + } + $strength = $package_path->getPathMatchStrength($path); if ($strength > $best_match) { $best_match = $strength;