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

Link prominently to Harbormaster Buildables in build result output

Summary: Ref T8096. We don't currently link to the buildable, which I think contributes to Harbormaster feeling a little scattered.

Test Plan: {F528095}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8096

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

+28 -10
+28 -10
src/applications/harbormaster/event/HarbormasterUIEventListener.php
··· 51 51 return; 52 52 } 53 53 54 - $buildables = id(new HarbormasterBuildableQuery()) 54 + $buildable = id(new HarbormasterBuildableQuery()) 55 55 ->setViewer($user) 56 56 ->withManualBuildables(false) 57 57 ->withBuildablePHIDs(array($buildable_phid)) 58 - ->execute(); 59 - if (!$buildables) { 58 + ->needBuilds(true) 59 + ->executeOne(); 60 + if (!$buildable) { 60 61 return; 61 62 } 62 63 63 - $builds = id(new HarbormasterBuildQuery()) 64 - ->setViewer($user) 65 - ->withBuildablePHIDs(mpull($buildables, 'getPHID')) 66 - ->execute(); 67 - if (!$builds) { 68 - return; 69 - } 64 + $builds = $buildable->getBuilds(); 70 65 71 66 $build_handles = id(new PhabricatorHandleQuery()) 72 67 ->setViewer($user) ··· 74 69 ->execute(); 75 70 76 71 $status_view = new PHUIStatusListView(); 72 + 73 + $buildable_status = $buildable->getBuildableStatus(); 74 + $buildable_icon = HarbormasterBuildable::getBuildableStatusIcon( 75 + $buildable_status); 76 + $buildable_color = HarbormasterBuildable::getBuildableStatusColor( 77 + $buildable_status); 78 + $buildable_name = HarbormasterBuildable::getBuildableStatusName( 79 + $buildable_status); 80 + 81 + $target = phutil_tag( 82 + 'a', 83 + array( 84 + 'href' => '/'.$buildable->getMonogram(), 85 + ), 86 + pht('Buildable %d', $buildable->getID())); 87 + 88 + $target = phutil_tag('strong', array(), $target); 89 + 90 + $status_view 91 + ->addItem( 92 + id(new PHUIStatusItemView()) 93 + ->setIcon($buildable_icon, $buildable_color, $buildable_name) 94 + ->setTarget($target)); 77 95 78 96 foreach ($builds as $build) { 79 97 $item = new PHUIStatusItemView();