1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-24 14:30:56 +01:00

Include explicit "Auditors:" in initial Diffusion email

Summary:
See https://groups.google.com/forum/?hl=en_US&fromgroups#!topic/phabricator-dev/ZonbTN-0TGw

When a commit's author explicitly specifies users as "Auditors", send them an email about the commit.

Test Plan: Made a commit with "Auditors: turtle", ran "reparse.php --herald" on it, verified user "turtle" got included in the intial email.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran, MarkChuCarroll

Differential Revision: https://secure.phabricator.com/D3032
This commit is contained in:
epriestley 2012-07-23 09:24:02 -07:00
parent 59db282624
commit 4dd707b189

View file

@ -50,7 +50,7 @@ final class PhabricatorRepositoryCommitHeraldWorker
$this->createAudits($commit, $audit_phids, $rules);
}
$this->createAuditsFromCommitMessage($commit, $data);
$explicit_auditors = $this->createAuditsFromCommitMessage($commit, $data);
if ($repository->getDetail('herald-disabled')) {
// This just means "disable email"; audits are (mostly) idempotent.
@ -59,7 +59,12 @@ final class PhabricatorRepositoryCommitHeraldWorker
$this->publishFeedStory($repository, $commit, $data);
$email_phids = $adapter->getEmailPHIDs();
$herald_targets = $adapter->getEmailPHIDs();
$email_phids = array_unique(
array_merge(
$explicit_auditors,
$herald_targets));
if (!$email_phids) {
return;
}
@ -255,6 +260,8 @@ final class PhabricatorRepositoryCommitHeraldWorker
$commit->updateAuditStatus($requests);
$commit->save();
return $phids;
}
private function publishFeedStory(