mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 21:32:43 +01:00
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
This commit is contained in:
parent
b09168e689
commit
027d4ffd8b
3 changed files with 8 additions and 8 deletions
|
@ -152,10 +152,6 @@ final class DiffusionRepositoryCreateController
|
|||
// transactions to apply this change.
|
||||
$repository->setCallsign($callsign);
|
||||
|
||||
// Put the repository in "Importing" mode until we finish
|
||||
// parsing it.
|
||||
$repository->setDetail('importing', true);
|
||||
|
||||
$xactions[] = id(clone $template)
|
||||
->setTransactionType($type_name)
|
||||
->setNewValue(
|
||||
|
|
|
@ -16,7 +16,7 @@ final class RepositoryCreateConduitAPIMethod
|
|||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return 'Create a new repository (Admin Only).';
|
||||
return pht('Create a new repository.');
|
||||
}
|
||||
|
||||
public function defineParamTypes() {
|
||||
|
@ -48,8 +48,6 @@ final class RepositoryCreateConduitAPIMethod
|
|||
|
||||
public function defineErrorTypes() {
|
||||
return array(
|
||||
'ERR-PERMISSIONS' =>
|
||||
'You do not have the authority to call this method.',
|
||||
'ERR-DUPLICATE' =>
|
||||
'Duplicate repository callsign.',
|
||||
'ERR-BAD-CALLSIGN' =>
|
||||
|
|
|
@ -69,10 +69,16 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
|
|||
$edit_policy = $app->getPolicy(DiffusionDefaultEditCapability::CAPABILITY);
|
||||
$push_policy = $app->getPolicy(DiffusionDefaultPushCapability::CAPABILITY);
|
||||
|
||||
return id(new PhabricatorRepository())
|
||||
$repository = id(new PhabricatorRepository())
|
||||
->setViewPolicy($view_policy)
|
||||
->setEditPolicy($edit_policy)
|
||||
->setPushPolicy($push_policy);
|
||||
|
||||
// Put the repository in "Importing" mode until we finish
|
||||
// parsing it.
|
||||
$repository->setDetail('importing', true);
|
||||
|
||||
return $repository;
|
||||
}
|
||||
|
||||
protected function getConfiguration() {
|
||||
|
|
Loading…
Reference in a new issue