1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-18 02:31:10 +01:00

Make "Tags" and "Branches" custom fields work properly in Diffusion

Summary: Ref T8295 (vaguely related). This old method has no callsites.

Test Plan: Generated mail, saw "Tags" and "Branches".

Reviewers: fabe, joshuaspence

Reviewed By: fabe, joshuaspence

Subscribers: epriestley

Maniphest Tasks: T8295

Differential Revision: https://secure.phabricator.com/D13000
This commit is contained in:
epriestley 2015-05-25 05:34:41 -07:00
parent 969a6a2b38
commit 3d2c6f1ed2
3 changed files with 10 additions and 24 deletions

View file

@ -7,13 +7,14 @@ final class PhabricatorCommitBranchesField
return 'diffusion:branches';
}
public function shouldAppearInApplicationTransactions() {
public function shouldAppearInTransactionMail() {
return true;
}
public function buildApplicationTransactionMailBody(
PhabricatorApplicationTransaction $xaction,
PhabricatorMetaMTAMailBody $body) {
public function updateTransactionMailBody(
PhabricatorMetaMTAMailBody $body,
PhabricatorApplicationTransactionEditor $editor,
array $xactions) {
$params = array(
'contains' => $this->getObject()->getCommitIdentifier(),

View file

@ -7,13 +7,14 @@ final class PhabricatorCommitTagsField
return 'diffusion:tags';
}
public function shouldAppearInApplicationTransactions() {
public function shouldAppearInTransactionMail() {
return true;
}
public function buildApplicationTransactionMailBody(
PhabricatorApplicationTransaction $xaction,
PhabricatorMetaMTAMailBody $body) {
public function updateTransactionMailBody(
PhabricatorMetaMTAMailBody $body,
PhabricatorApplicationTransactionEditor $editor,
array $xactions) {
$params = array(
'commit' => $this->getObject()->getCommitIdentifier(),

View file

@ -1055,22 +1055,6 @@ abstract class PhabricatorCustomField {
return false;
}
/**
* TODO: this is only used by Diffusion right now and everything is completely
* faked since Diffusion doesn't use ApplicationTransactions yet. This should
* get fleshed out as we have more use cases.
*
* @task appxaction
*/
public function buildApplicationTransactionMailBody(
PhabricatorApplicationTransaction $xaction,
PhabricatorMetaMTAMailBody $body) {
if ($this->proxy) {
return $this->proxy->buildApplicationTransactionMailBody($xaction, $body);
}
return;
}
/* -( Transaction Mail )--------------------------------------------------- */