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

Pass branch information to local Conduit calls in Diffusion

Summary: Fixes T3697. Currently, we don't pass "branch" implicitly, so, e.g., when viewing a branch you don't get the right commit hash when looking up the README.

Test Plan: Viewed a non-`master` branch with a README, no fatal. Poked around and couldn't find anything suspicious.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3697

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

+11 -3
+4 -1
src/applications/diffusion/conduit/ConduitAPI_diffusion_abstractquery_Method.php
··· 90 90 final public function defineParamTypes() { 91 91 return $this->defineCustomParamTypes() + 92 92 array( 93 - 'callsign' => 'required string'); 93 + 'callsign' => 'required string', 94 + 'branch' => 'optional string', 95 + ); 94 96 } 95 97 /** 96 98 * Subclasses should override this to specify custom param types. ··· 139 141 array( 140 142 'user' => $request->getUser(), 141 143 'callsign' => $request->getValue('callsign'), 144 + 'branch' => $request->getValue('branch'), 142 145 'path' => $request->getValue('path'), 143 146 'commit' => $request->getValue('commit'), 144 147 ));
+1 -1
src/applications/diffusion/controller/DiffusionBrowseController.php
··· 86 86 $readme = $this->callConduitWithDiffusionRequest( 87 87 'diffusion.readmequery', 88 88 array( 89 - 'paths' => $results->getPathDicts() 89 + 'paths' => $results->getPathDicts(), 90 90 )); 91 91 if ($readme) { 92 92 $box = new PHUIBoxView();
+6 -1
src/applications/diffusion/query/DiffusionQuery.php
··· 53 53 $repository = $drequest->getRepository(); 54 54 55 55 $core_params = array( 56 - 'callsign' => $repository->getCallsign() 56 + 'callsign' => $repository->getCallsign(), 57 57 ); 58 + 59 + if ($drequest->getBranch() !== null) { 60 + $core_params['branch'] = $drequest->getBranch(); 61 + } 62 + 58 63 $params = $params + $core_params; 59 64 60 65 return id(new ConduitCall(