1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-03 12:12:43 +01:00
phorge-phorge/src/applications/diffusion/herald/DiffusionCommitCommitterHeraldField.php
epriestley 6628cd2b4f In Herald "Commit" rules, use repository identities to identify authors and committers
Summary: Ref T13480. The Herald "Commit" rules still use raw commit data properties to identify authors and committers. Instead, use repository identities.

Test Plan: Wrote a Herald rule using all four fields, ran it against various commits with and without known authors. Checked transcript for sensible field values.

Maniphest Tasks: T13480

Differential Revision: https://secure.phabricator.com/D20955
2020-01-29 15:48:59 -08:00

24 lines
518 B
PHP

<?php
final class DiffusionCommitCommitterHeraldField
extends DiffusionCommitHeraldField {
const FIELDCONST = 'diffusion.commit.committer';
public function getHeraldFieldName() {
return pht('Committer');
}
public function getHeraldFieldValue($object) {
return $this->getAdapter()->getCommitterPHID();
}
protected function getHeraldFieldStandardType() {
return self::STANDARD_PHID_NULLABLE;
}
protected function getDatasource() {
return new PhabricatorPeopleDatasource();
}
}