mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
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
This commit is contained in:
parent
5240cffd9c
commit
42034e6739
4 changed files with 26 additions and 1 deletions
|
@ -438,7 +438,8 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
$repository = $drequest->getRepository();
|
||||
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setUser($this->getRequest()->getUser());
|
||||
->setUser($this->getRequest()->getUser())
|
||||
->setObject($commit);
|
||||
|
||||
$edge_query = id(new PhabricatorEdgeQuery())
|
||||
->withSourcePHIDs(array($commit_phid))
|
||||
|
|
|
@ -8,8 +8,16 @@ final class PhabricatorProjectUIEventListener
|
|||
}
|
||||
|
||||
public function handleEvent(PhutilEvent $event) {
|
||||
$object = $event->getValue('object');
|
||||
|
||||
switch ($event->getType()) {
|
||||
case PhabricatorEventType::TYPE_UI_WILLRENDERPROPERTIES:
|
||||
// Hacky solution so that property list view on Diffusion
|
||||
// commits shows build status, but not Projects, Subscriptions,
|
||||
// or Tokens.
|
||||
if ($object instanceof PhabricatorRepositoryCommit) {
|
||||
return;
|
||||
}
|
||||
$this->handlePropertyEvent($event);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -9,11 +9,19 @@ final class PhabricatorSubscriptionsUIEventListener
|
|||
}
|
||||
|
||||
public function handleEvent(PhutilEvent $event) {
|
||||
$object = $event->getValue('object');
|
||||
|
||||
switch ($event->getType()) {
|
||||
case PhabricatorEventType::TYPE_UI_DIDRENDERACTIONS:
|
||||
$this->handleActionEvent($event);
|
||||
break;
|
||||
case PhabricatorEventType::TYPE_UI_WILLRENDERPROPERTIES:
|
||||
// Hacky solution so that property list view on Diffusion
|
||||
// commits shows build status, but not Projects, Subscriptions,
|
||||
// or Tokens.
|
||||
if ($object instanceof PhabricatorRepositoryCommit) {
|
||||
return;
|
||||
}
|
||||
$this->handlePropertyEvent($event);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -9,11 +9,19 @@ final class PhabricatorTokenUIEventListener
|
|||
}
|
||||
|
||||
public function handleEvent(PhutilEvent $event) {
|
||||
$object = $event->getValue('object');
|
||||
|
||||
switch ($event->getType()) {
|
||||
case PhabricatorEventType::TYPE_UI_DIDRENDERACTIONS:
|
||||
$this->handleActionEvent($event);
|
||||
break;
|
||||
case PhabricatorEventType::TYPE_UI_WILLRENDERPROPERTIES:
|
||||
// Hacky solution so that property list view on Diffusion
|
||||
// commits shows build status, but not Projects, Subscriptions,
|
||||
// or Tokens.
|
||||
if ($object instanceof PhabricatorRepositoryCommit) {
|
||||
return;
|
||||
}
|
||||
$this->handlePropertyEvent($event);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue