mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-18 02:31:10 +01:00
Don't send mail to "uninteresting" auditors
Summary: Fixes T11017. We add packages as "uninteresting" auditors so that we can query commits by package later. Until recently, this didn't matter because we didn't send mail to packages. But now we do, so stop mailing them when they don't actually need to do anything. Test Plan: - Made a commit to a file which was part of a package but which I owned (so it does not trigger auditing). - `var_dump()`'d mail "To:" PHIDs. - Before patch: included package. - After patch: no package. Reviewers: chad Reviewed By: chad Maniphest Tasks: T11017 Differential Revision: https://secure.phabricator.com/D15970
This commit is contained in:
parent
bb16a1b0e2
commit
74e117ae41
1 changed files with 6 additions and 0 deletions
|
@ -642,6 +642,12 @@ final class PhabricatorAuditEditor
|
|||
|
||||
$status_resigned = PhabricatorAuditStatusConstants::RESIGNED;
|
||||
foreach ($object->getAudits() as $audit) {
|
||||
if (!$audit->isInteresting()) {
|
||||
// Don't send mail to uninteresting auditors, like packages which
|
||||
// own this code but which audits have not triggered for.
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($audit->getAuditStatus() != $status_resigned) {
|
||||
$phids[] = $audit->getAuditorPHID();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue