mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-02 19:52:44 +01:00
80fe382e3d
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
600 B
PHP
26 lines
600 B
PHP
<?php
|
|
|
|
final class DiffusionPreCommitRefPusherProjectsHeraldField
|
|
extends DiffusionPreCommitRefHeraldField {
|
|
|
|
const FIELDCONST = 'diffusion.pre.ref.pusher.projects';
|
|
|
|
public function getHeraldFieldName() {
|
|
return pht("Pusher's projects");
|
|
}
|
|
|
|
public function getHeraldFieldValue($object) {
|
|
return $this->getAdapter()
|
|
->getHookEngine()
|
|
->loadViewerProjectPHIDsForHerald();
|
|
}
|
|
|
|
protected function getHeraldFieldStandardType() {
|
|
return HeraldField::STANDARD_PHID_LIST;
|
|
}
|
|
|
|
protected function getDatasource() {
|
|
return new PhabricatorProjectDatasource();
|
|
}
|
|
|
|
}
|