Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistWorkflow.php
Show First 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | final public function newLegacyPhutilWorkflow() { | ||||
} | } | ||||
$phutil_workflow->setArguments($specs); | $phutil_workflow->setArguments($specs); | ||||
$synopses = $this->getCommandSynopses(); | $synopses = $this->getCommandSynopses(); | ||||
$phutil_workflow->setSynopsis($synopses); | $phutil_workflow->setSynopsis($synopses); | ||||
$help = $this->getCommandHelp(); | $help = $this->getCommandHelp(); | ||||
if ($help == null) { | |||||
$help = ''; | |||||
} | |||||
if (strlen($help)) { | if (strlen($help)) { | ||||
$phutil_workflow->setHelp($help); | $phutil_workflow->setHelp($help); | ||||
} | } | ||||
return $phutil_workflow; | return $phutil_workflow; | ||||
} | } | ||||
final protected function newWorkflowArgument($key) { | final protected function newWorkflowArgument($key) { | ||||
▲ Show 20 Lines • Show All 265 Lines • ▼ Show 20 Lines | try { | ||||
'Set conduit credentials with %s before authenticating conduit!', | 'Set conduit credentials with %s before authenticating conduit!', | ||||
'setConduitCredentials()')); | 'setConduitCredentials()')); | ||||
} | } | ||||
// If we have `token`, this server supports the simpler, new-style | // If we have `token`, this server supports the simpler, new-style | ||||
// token-based authentication. Use that instead of all the certificate | // token-based authentication. Use that instead of all the certificate | ||||
// stuff. | // stuff. | ||||
$token = idx($credentials, 'token'); | $token = idx($credentials, 'token'); | ||||
if ($token == null) { | |||||
$token = ''; | |||||
} | |||||
if (strlen($token)) { | if (strlen($token)) { | ||||
$conduit = $this->getConduit(); | $conduit = $this->getConduit(); | ||||
$conduit->setConduitToken($token); | $conduit->setConduitToken($token); | ||||
try { | try { | ||||
$result = $this->getConduit()->callMethodSynchronous( | $result = $this->getConduit()->callMethodSynchronous( | ||||
'user.whoami', | 'user.whoami', | ||||
▲ Show 20 Lines • Show All 1,980 Lines • Show Last 20 Lines |