Differential D20124 Diff 48065 src/applications/repository/worker/PhabricatorRepositoryCommitOwnersWorker.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/worker/PhabricatorRepositoryCommitOwnersWorker.php
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | final class PhabricatorRepositoryCommitOwnersWorker | ||||
private function shouldTriggerAudit( | private function shouldTriggerAudit( | ||||
PhabricatorRepositoryCommit $commit, | PhabricatorRepositoryCommit $commit, | ||||
PhabricatorOwnersPackage $package, | PhabricatorOwnersPackage $package, | ||||
$author_phid, | $author_phid, | ||||
$revision) { | $revision) { | ||||
// Don't trigger an audit if auditing isn't enabled for the package. | // Don't trigger an audit if auditing isn't enabled for the package. | ||||
if (!$package->getAuditingEnabled()) { | $rule = $package->newAuditingRule(); | ||||
if ($rule->getKey() === PhabricatorOwnersAuditRule::AUDITING_NONE) { | |||||
return false; | return false; | ||||
} | } | ||||
// Trigger an audit if we don't recognize the commit's author. | // Trigger an audit if we don't recognize the commit's author. | ||||
if (!$author_phid) { | if (!$author_phid) { | ||||
return true; | return true; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |