1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 03:50:54 +01:00

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:
Joshua Spence 2014-06-19 02:36:08 +10:00
parent f52fbf6117
commit e0ca39f6a1

View file

@ -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());
}
}