@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.

Property list view on Diffusion commits should show build status but not Subscriptions, Projects, or Tokens

Summary: Ref T13019, adds build status back to Diffusion commits

Test Plan: Open a Diffusion commit that has a build status, property list view should show the build status, but not Subscriptions, Projects, or Tokens.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T13019

Differential Revision: https://secure.phabricator.com/D18813

authored by

lkassianik and committed by
lpriestley
42034e67 5240cffd

+26 -1
+2 -1
src/applications/diffusion/controller/DiffusionCommitController.php
··· 438 438 $repository = $drequest->getRepository(); 439 439 440 440 $view = id(new PHUIPropertyListView()) 441 - ->setUser($this->getRequest()->getUser()); 441 + ->setUser($this->getRequest()->getUser()) 442 + ->setObject($commit); 442 443 443 444 $edge_query = id(new PhabricatorEdgeQuery()) 444 445 ->withSourcePHIDs(array($commit_phid))
+8
src/applications/project/events/PhabricatorProjectUIEventListener.php
··· 8 8 } 9 9 10 10 public function handleEvent(PhutilEvent $event) { 11 + $object = $event->getValue('object'); 12 + 11 13 switch ($event->getType()) { 12 14 case PhabricatorEventType::TYPE_UI_WILLRENDERPROPERTIES: 15 + // Hacky solution so that property list view on Diffusion 16 + // commits shows build status, but not Projects, Subscriptions, 17 + // or Tokens. 18 + if ($object instanceof PhabricatorRepositoryCommit) { 19 + return; 20 + } 13 21 $this->handlePropertyEvent($event); 14 22 break; 15 23 }
+8
src/applications/subscriptions/events/PhabricatorSubscriptionsUIEventListener.php
··· 9 9 } 10 10 11 11 public function handleEvent(PhutilEvent $event) { 12 + $object = $event->getValue('object'); 13 + 12 14 switch ($event->getType()) { 13 15 case PhabricatorEventType::TYPE_UI_DIDRENDERACTIONS: 14 16 $this->handleActionEvent($event); 15 17 break; 16 18 case PhabricatorEventType::TYPE_UI_WILLRENDERPROPERTIES: 19 + // Hacky solution so that property list view on Diffusion 20 + // commits shows build status, but not Projects, Subscriptions, 21 + // or Tokens. 22 + if ($object instanceof PhabricatorRepositoryCommit) { 23 + return; 24 + } 17 25 $this->handlePropertyEvent($event); 18 26 break; 19 27 }
+8
src/applications/tokens/event/PhabricatorTokenUIEventListener.php
··· 9 9 } 10 10 11 11 public function handleEvent(PhutilEvent $event) { 12 + $object = $event->getValue('object'); 13 + 12 14 switch ($event->getType()) { 13 15 case PhabricatorEventType::TYPE_UI_DIDRENDERACTIONS: 14 16 $this->handleActionEvent($event); 15 17 break; 16 18 case PhabricatorEventType::TYPE_UI_WILLRENDERPROPERTIES: 19 + // Hacky solution so that property list view on Diffusion 20 + // commits shows build status, but not Projects, Subscriptions, 21 + // or Tokens. 22 + if ($object instanceof PhabricatorRepositoryCommit) { 23 + return; 24 + } 17 25 $this->handlePropertyEvent($event); 18 26 break; 19 27 }