mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 21:32:43 +01:00
set localpath in repository.create
Summary: Since there's no way to set it, it defaults to an empty value. Make the conduit call set up sane default. Test Plan: Call method, repo get's built with expected localpath. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D9842
This commit is contained in:
parent
8756d82cf6
commit
64e2aad46f
1 changed files with 8 additions and 1 deletions
|
@ -25,7 +25,7 @@ final class ConduitAPI_repository_create_Method
|
|||
'description' => 'optional string',
|
||||
'encoding' => 'optional string',
|
||||
'tracking' => 'optional bool',
|
||||
'uri' => 'optional string',
|
||||
'uri' => 'required string',
|
||||
'credentialPHID' => 'optional string',
|
||||
'svnSubpath' => 'optional string',
|
||||
'branchFilter' => 'optional list<string>',
|
||||
|
@ -82,6 +82,12 @@ final class ConduitAPI_repository_create_Method
|
|||
}
|
||||
$repository->setCallsign($callsign);
|
||||
|
||||
$local_path = PhabricatorEnv::getEnvConfig(
|
||||
'repository.default-local-path');
|
||||
|
||||
$local_path = rtrim($local_path, '/');
|
||||
$local_path = $local_path.'/'.$callsign.'/';
|
||||
|
||||
$vcs = $request->getValue('vcs');
|
||||
|
||||
$map = array(
|
||||
|
@ -104,6 +110,7 @@ final class ConduitAPI_repository_create_Method
|
|||
'description' => $request->getValue('description'),
|
||||
'tracking-enabled' => (bool)$request->getValue('tracking', true),
|
||||
'remote-uri' => $remote_uri,
|
||||
'local-path' => $local_path,
|
||||
'branch-filter' => array_fill_keys(
|
||||
$request->getValue('branchFilter', array()),
|
||||
true),
|
||||
|
|
Loading…
Reference in a new issue