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

Convert `diffusion.looksoon` to use repository identifiers instead of callsigns

Summary:
Ref T4245. Like everything else, accept more identifiers.

This needs a change in `arc`, which I've made a note about elsewhere.

Test Plan: Used "Update Now" from web UI, saw update get scheduled.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

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

+15 -9
+2 -2
src/applications/differential/controller/DifferentialRevisionLandController.php
··· 146 146 $looksoon = new ConduitCall( 147 147 'diffusion.looksoon', 148 148 array( 149 - 'callsigns' => array($repository->getCallsign()), 149 + 'repositories' => array($repository->getPHID()), 150 150 )); 151 151 $looksoon->setUser($request->getUser()); 152 152 $looksoon->execute(); ··· 155 155 } 156 156 157 157 private function lockRepository($repository) { 158 - $lock_name = __CLASS__.':'.($repository->getCallsign()); 158 + $lock_name = __CLASS__.':'.($repository->getPHID()); 159 159 $lock = PhabricatorGlobalLock::newLock($lock_name); 160 160 $lock->lock(); 161 161 return $lock;
+10 -4
src/applications/diffusion/conduit/DiffusionLookSoonConduitAPIMethod.php
··· 24 24 25 25 protected function defineParamTypes() { 26 26 return array( 27 - 'callsigns' => 'required list<string>', 27 + 'callsigns' => 'optional list<string> (deprecated)', 28 + 'repositories' => 'optional list<string>', 28 29 'urgency' => 'optional string', 29 30 ); 30 31 } ··· 33 34 // NOTE: The "urgency" parameter does nothing, it is just a hilarious joke 34 35 // which exemplifies the boundless clever wit of this project. 35 36 36 - $callsigns = $request->getValue('callsigns'); 37 - if (!$callsigns) { 37 + $identifiers = $request->getValue('repositories'); 38 + 39 + if (!$identifiers) { 40 + $identifiers = $request->getValue('callsigns'); 41 + } 42 + 43 + if (!$identifiers) { 38 44 return null; 39 45 } 40 46 41 47 $repositories = id(new PhabricatorRepositoryQuery()) 42 48 ->setViewer($request->getUser()) 43 - ->withCallsigns($callsigns) 49 + ->withIdentifiers($identifiers) 44 50 ->execute(); 45 51 46 52 foreach ($repositories as $repository) {
+1 -1
src/applications/diffusion/controller/DiffusionController.php
··· 212 212 'path' => '', 213 213 )), 214 214 ), 215 - 'r'.$drequest->getRepository()->getCallsign()); 215 + $drequest->getRepository()->getDisplayName()); 216 216 $links[] = $divider; 217 217 $accum = ''; 218 218 $last_key = last_key($path_parts);
+2 -2
src/applications/diffusion/controller/DiffusionRepositoryEditUpdateController.php
··· 25 25 26 26 if ($request->isFormPost()) { 27 27 $params = array( 28 - 'callsigns' => array( 29 - $repository->getCallsign(), 28 + 'repositories' => array( 29 + $repository->getPHID(), 30 30 ), 31 31 ); 32 32