@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
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at recaptime-dev/main 43 lines 997 B view raw
1<?php 2 3final class DiffusionCommitRevisionAcceptingReviewersHeraldField 4 extends DiffusionCommitHeraldField { 5 6 const FIELDCONST = 'diffusion.commit.revision.accepting'; 7 8 public function getHeraldFieldName() { 9 return pht('Accepting reviewers'); 10 } 11 12 public function getFieldGroupKey() { 13 return HeraldRelatedFieldGroup::FIELDGROUPKEY; 14 } 15 16 public function getHeraldFieldValue($object) { 17 $revision = $this->getAdapter()->loadDifferentialRevision(); 18 19 if (!$revision) { 20 return array(); 21 } 22 23 $diff_phid = $revision->getActiveDiffPHID(); 24 25 $reviewer_phids = array(); 26 foreach ($revision->getReviewers() as $reviewer) { 27 if ($reviewer->isAccepted($diff_phid)) { 28 $reviewer_phids[] = $reviewer->getReviewerPHID(); 29 } 30 } 31 32 return $reviewer_phids; 33 } 34 35 protected function getHeraldFieldStandardType() { 36 return self::STANDARD_PHID_LIST; 37 } 38 39 protected function getDatasource() { 40 return new DifferentialReviewerDatasource(); 41 } 42 43}