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

Set "importing" flag on repositories created via API

Summary: Ref T6516. We incorrectly fail to set this flag on repositories created via Conduit, which activates too many actions on old commits.

Test Plan:
- Created a new repository via Conduit, verified it was "importing" after creation.
- Created a new repostiory via web UI, verified it was "importing" after creation.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6516

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

+8 -8
-4
src/applications/diffusion/controller/DiffusionRepositoryCreateController.php
··· 152 152 // transactions to apply this change. 153 153 $repository->setCallsign($callsign); 154 154 155 - // Put the repository in "Importing" mode until we finish 156 - // parsing it. 157 - $repository->setDetail('importing', true); 158 - 159 155 $xactions[] = id(clone $template) 160 156 ->setTransactionType($type_name) 161 157 ->setNewValue(
+1 -3
src/applications/repository/conduit/RepositoryCreateConduitAPIMethod.php
··· 16 16 } 17 17 18 18 public function getMethodDescription() { 19 - return 'Create a new repository (Admin Only).'; 19 + return pht('Create a new repository.'); 20 20 } 21 21 22 22 public function defineParamTypes() { ··· 48 48 49 49 public function defineErrorTypes() { 50 50 return array( 51 - 'ERR-PERMISSIONS' => 52 - 'You do not have the authority to call this method.', 53 51 'ERR-DUPLICATE' => 54 52 'Duplicate repository callsign.', 55 53 'ERR-BAD-CALLSIGN' =>
+7 -1
src/applications/repository/storage/PhabricatorRepository.php
··· 69 69 $edit_policy = $app->getPolicy(DiffusionDefaultEditCapability::CAPABILITY); 70 70 $push_policy = $app->getPolicy(DiffusionDefaultPushCapability::CAPABILITY); 71 71 72 - return id(new PhabricatorRepository()) 72 + $repository = id(new PhabricatorRepository()) 73 73 ->setViewPolicy($view_policy) 74 74 ->setEditPolicy($edit_policy) 75 75 ->setPushPolicy($push_policy); 76 + 77 + // Put the repository in "Importing" mode until we finish 78 + // parsing it. 79 + $repository->setDetail('importing', true); 80 + 81 + return $repository; 76 82 } 77 83 78 84 protected function getConfiguration() {