mirror of
https://we.phorge.it/source/phorge.git
synced 2025-03-31 22:48:16 +02:00
Summary: Ref T13093. See PHI396. These are possibly somewhat niche, but reasonable to support and consistent with the existing "Pusher's projects". Also relabel "Pusher's projects" and "Project tags" for consistency and, hopefully, clarity. Test Plan: - Created new "commit" and "hook: commit content" Herald rules which run against "Author's projects" and "Committer's projects". - Test console'd the "Commit" rules. - Pushed through the "Hook" rule. - In all cases, saw fields populate appropriately. Maniphest Tasks: T13093 Differential Revision: https://secure.phabricator.com/D19145
26 lines
694 B
PHP
26 lines
694 B
PHP
<?php
|
|
|
|
final class DiffusionPreCommitRefRepositoryProjectsHeraldField
|
|
extends DiffusionPreCommitRefHeraldField {
|
|
|
|
const FIELDCONST = 'diffusion.pre.ref.repository.projects';
|
|
|
|
public function getHeraldFieldName() {
|
|
return pht('Repository projects');
|
|
}
|
|
|
|
public function getHeraldFieldValue($object) {
|
|
return PhabricatorEdgeQuery::loadDestinationPHIDs(
|
|
$this->getAdapter()->getHookEngine()->getRepository()->getPHID(),
|
|
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST);
|
|
}
|
|
|
|
protected function getHeraldFieldStandardType() {
|
|
return self::STANDARD_PHID_LIST;
|
|
}
|
|
|
|
protected function getDatasource() {
|
|
return new PhabricatorProjectDatasource();
|
|
}
|
|
|
|
}
|