@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
at recaptime-dev/main 26 lines 694 B view raw
1<?php 2 3final class DiffusionPreCommitRefRepositoryProjectsHeraldField 4 extends DiffusionPreCommitRefHeraldField { 5 6 const FIELDCONST = 'diffusion.pre.ref.repository.projects'; 7 8 public function getHeraldFieldName() { 9 return pht('Repository projects'); 10 } 11 12 public function getHeraldFieldValue($object) { 13 return PhabricatorEdgeQuery::loadDestinationPHIDs( 14 $this->getAdapter()->getHookEngine()->getRepository()->getPHID(), 15 PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); 16 } 17 18 protected function getHeraldFieldStandardType() { 19 return self::STANDARD_PHID_LIST; 20 } 21 22 protected function getDatasource() { 23 return new PhabricatorProjectDatasource(); 24 } 25 26}