mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
Actually squelch Harbormaster "test passed" mail
Summary: Ref T1049. When Harbormaster tests pass, don't bother sending an email about it. (I tried to implement this earlier but didn't test it entirely properly, and we needed a little more code.) Test Plan: Used `bin/harbormaster build` to build some junk, got no email about passes. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T1049 Differential Revision: https://secure.phabricator.com/D8813
This commit is contained in:
parent
f1245f4f34
commit
9889892e5b
2 changed files with 16 additions and 1 deletions
|
@ -81,7 +81,7 @@ final class DifferentialTransaction extends PhabricatorApplicationTransaction {
|
|||
return ($this !== head($xactions));
|
||||
}
|
||||
|
||||
return $this->shouldHide();
|
||||
return parent::shouldHideForMail($xactions);
|
||||
}
|
||||
|
||||
public function getBodyForMail() {
|
||||
|
|
|
@ -1721,6 +1721,21 @@ abstract class PhabricatorApplicationTransactionEditor
|
|||
PhabricatorLiskDAO $object,
|
||||
array $xactions) {
|
||||
|
||||
// Check if any of the transactions are visible. If we don't have any
|
||||
// visible transactions, don't send the mail.
|
||||
|
||||
$any_visible = false;
|
||||
foreach ($xactions as $xaction) {
|
||||
if (!$xaction->shouldHideForMail($xactions)) {
|
||||
$any_visible = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$any_visible) {
|
||||
return;
|
||||
}
|
||||
|
||||
$email_to = array_filter(array_unique($this->getMailTo($object)));
|
||||
$email_cc = array_filter(array_unique($this->getMailCC($object)));
|
||||
|
||||
|
|
Loading…
Reference in a new issue