Differential D20564 Diff 49055 src/applications/repository/worker/PhabricatorRepositoryCommitPublishWorker.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/worker/PhabricatorRepositoryCommitPublishWorker.php
Show First 20 Lines • Show All 217 Lines • ▼ Show 20 Lines | switch ($rule->getKey()) { | ||||
case PhabricatorOwnersAuditRule::AUDITING_NO_OWNER_AND_UNREVIEWED: | case PhabricatorOwnersAuditRule::AUDITING_NO_OWNER_AND_UNREVIEWED: | ||||
$audit_uninvolved = true; | $audit_uninvolved = true; | ||||
$audit_unreviewed = true; | $audit_unreviewed = true; | ||||
break; | break; | ||||
} | } | ||||
// If auditing is configured to trigger on unreviewed changes, check if | // If auditing is configured to trigger on unreviewed changes, check if | ||||
// the revision was "Accepted" when it landed. If not, trigger an audit. | // the revision was "Accepted" when it landed. If not, trigger an audit. | ||||
// We may be running before the revision actually closes, so we'll count | |||||
// either an "Accepted" or a "Closed, Previously Accepted" revision as | |||||
// good enough. | |||||
if ($audit_unreviewed) { | if ($audit_unreviewed) { | ||||
$commit_unreviewed = true; | $commit_unreviewed = true; | ||||
if ($revision) { | if ($revision) { | ||||
if ($revision->isAccepted()) { | |||||
$commit_unreviewed = false; | |||||
} else { | |||||
$was_accepted = DifferentialRevision::PROPERTY_CLOSED_FROM_ACCEPTED; | $was_accepted = DifferentialRevision::PROPERTY_CLOSED_FROM_ACCEPTED; | ||||
if ($revision->isPublished()) { | if ($revision->isPublished()) { | ||||
if ($revision->getProperty($was_accepted)) { | if ($revision->getProperty($was_accepted)) { | ||||
$commit_unreviewed = false; | $commit_unreviewed = false; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | |||||
if ($commit_unreviewed) { | if ($commit_unreviewed) { | ||||
return true; | return true; | ||||
} | } | ||||
} | } | ||||
// If auditing is configured to trigger on changes with no involved owner, | // If auditing is configured to trigger on changes with no involved owner, | ||||
// check for an owner. If we don't find one, trigger an audit. | // check for an owner. If we don't find one, trigger an audit. | ||||
▲ Show 20 Lines • Show All 142 Lines • Show Last 20 Lines |