mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +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:
parent
f52fbf6117
commit
e0ca39f6a1
1 changed files with 22 additions and 0 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue