mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 06:20: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:
parent
59db282624
commit
4dd707b189
1 changed files with 9 additions and 2 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue