mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +01:00
Explicitly list reviewers on reviewrequest email
Summary: This used to be in the subject but there was a bunch of churn and now it's nowhere. Test Plan: Created, updated, and added CCs to a diff. Reviewed By: moskov Reviewers: moskov, avitaloliver, jungejason, tuomaspelkonen, aran CC: aran, moskov Differential Revision: 567
This commit is contained in:
parent
d92f303e0c
commit
af107cff65
6 changed files with 19 additions and 8 deletions
|
@ -319,4 +319,12 @@ EOTEXT;
|
|||
return $this->heraldTranscriptURI;
|
||||
}
|
||||
|
||||
protected function renderHandleList(array $handles, array $phids) {
|
||||
$names = array();
|
||||
foreach ($phids as $phid) {
|
||||
$names[] = $handles[$phid]->getName();
|
||||
}
|
||||
return implode(', ', $names);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ class DifferentialCCWelcomeMail extends DifferentialReviewRequestMail {
|
|||
$body = array();
|
||||
|
||||
$body[] = "{$actor} added you to the CC list for the revision \"{$name}\".";
|
||||
$body[] = $this->renderReviewersLine();
|
||||
$body[] = null;
|
||||
|
||||
$body[] = $this->renderReviewRequestBody();
|
||||
|
|
|
@ -160,12 +160,4 @@ class DifferentialCommentMail extends DifferentialMail {
|
|||
|
||||
return implode("\n", $body);
|
||||
}
|
||||
|
||||
private function renderHandleList(array $handles, array $phids) {
|
||||
$names = array();
|
||||
foreach ($phids as $phid) {
|
||||
$names[] = $handles[$phid]->getName();
|
||||
}
|
||||
return implode(', ', $names);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ class DifferentialNewDiffMail extends DifferentialReviewRequestMail {
|
|||
} else {
|
||||
$body[] = "{$actor} updated the revision \"{$name}\".";
|
||||
}
|
||||
$body[] = $this->renderReviewersLine();
|
||||
$body[] = null;
|
||||
|
||||
$body[] = $this->renderReviewRequestBody();
|
||||
|
|
|
@ -39,6 +39,12 @@ abstract class DifferentialReviewRequestMail extends DifferentialMail {
|
|||
$this->setChangesets($changesets);
|
||||
}
|
||||
|
||||
protected function renderReviewersLine() {
|
||||
$reviewers = $this->getRevision()->getReviewers();
|
||||
$handles = id(new PhabricatorObjectHandleData($reviewers))->loadHandles();
|
||||
return 'Reviewers: '.$this->renderHandleList($handles, $reviewers);
|
||||
}
|
||||
|
||||
protected function renderReviewRequestBody() {
|
||||
$revision = $this->getRevision();
|
||||
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
|
||||
|
||||
phutil_require_module('phabricator', 'applications/differential/mail/base');
|
||||
phutil_require_module('phabricator', 'applications/phid/handle/data');
|
||||
|
||||
phutil_require_module('phutil', 'utils');
|
||||
|
||||
|
||||
phutil_require_source('DifferentialReviewRequestMail.php');
|
||||
|
|
Loading…
Reference in a new issue