Show repository in Differential emails
Summary: Ref T5137. Listing the repository in Differential emails makes it easy to filter. Test Plan: Eye-ball it. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: young_hwi, epriestley, Korvin Maniphest Tasks: T5137 Differential Revision: https://secure.phabricator.com/D9609
This commit is contained in:
@@ -143,4 +143,26 @@ final class DifferentialRepositoryField
|
||||
return $this->renderHandleList($handles);
|
||||
}
|
||||
|
||||
public function shouldAppearInTransactionMail() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function updateTransactionMailBody(
|
||||
PhabricatorMetaMTAMailBody $body,
|
||||
PhabricatorApplicationTransactionEditor $editor,
|
||||
array $xactions) {
|
||||
|
||||
if (!$editor->getDiffUpdateTransaction($xactions)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$repository = $this->getObject()->getRepository();
|
||||
if ($repository === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$body->addTextSection(pht('REPOSITORY'),
|
||||
$repository->getMonogram().' '.$repository->getName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user