Changeset View
Changeset View
Standalone View
Standalone View
src/applications/audit/editor/PhabricatorAuditEditor.php
Show First 20 Lines • Show All 883 Lines • ▼ Show 20 Lines | foreach ($audit_phids as $phid => $rule_ids) { | ||||
foreach ($rule_ids as $rule_id) { | foreach ($rule_ids as $rule_id) { | ||||
$this->addAuditReason( | $this->addAuditReason( | ||||
$phid, | $phid, | ||||
pht( | pht( | ||||
'%s Triggered Audit', | '%s Triggered Audit', | ||||
"H{$rule_id}")); | "H{$rule_id}")); | ||||
} | } | ||||
} | } | ||||
if ($audit_phids) { | if ($audit_phids) { | ||||
$xactions[] = id(new PhabricatorAuditTransaction()) | $xactions[] = id(new PhabricatorAuditTransaction()) | ||||
->setTransactionType(PhabricatorAuditActionConstants::ADD_AUDITORS) | ->setTransactionType(PhabricatorAuditActionConstants::ADD_AUDITORS) | ||||
->setNewValue(array_fuse(array_keys($audit_phids))) | ->setNewValue(array_fuse(array_keys($audit_phids))) | ||||
->setMetadataValue( | ->setMetadataValue( | ||||
'auditStatus', | 'auditStatus', | ||||
PhabricatorAuditStatusConstants::AUDIT_REQUIRED) | PhabricatorAuditStatusConstants::AUDIT_REQUIRED) | ||||
->setMetadataValue( | ->setMetadataValue( | ||||
'auditReasonMap', $this->auditReasonMap); | 'auditReasonMap', $this->auditReasonMap); | ||||
} | } | ||||
$cc_phids = $adapter->getAddCCMap(); | |||||
$add_ccs = array('+' => array()); | |||||
foreach ($cc_phids as $phid => $rule_ids) { | |||||
$add_ccs['+'][$phid] = $phid; | |||||
} | |||||
$xactions[] = id(new PhabricatorAuditTransaction()) | |||||
->setTransactionType(PhabricatorTransactions::TYPE_SUBSCRIBERS) | |||||
->setNewValue($add_ccs); | |||||
HarbormasterBuildable::applyBuildPlans( | HarbormasterBuildable::applyBuildPlans( | ||||
$object->getPHID(), | $object->getPHID(), | ||||
$object->getRepository()->getPHID(), | $object->getRepository()->getPHID(), | ||||
$adapter->getBuildPlans()); | $adapter->getBuildPlans()); | ||||
$limit = self::MAX_FILES_SHOWN_IN_EMAIL; | $limit = self::MAX_FILES_SHOWN_IN_EMAIL; | ||||
$files = $adapter->loadAffectedPaths(); | $files = $adapter->loadAffectedPaths(); | ||||
sort($files); | sort($files); | ||||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |