Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistWorkflow.php
Show First 20 Lines • Show All 473 Lines • ▼ Show 20 Lines | try { | ||||
pht( | pht( | ||||
'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 (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,748 Lines • ▼ Show 20 Lines | /* -( Phabricator Repositories )------------------------------------------- */ | ||||
protected function getModernLintDictionary(array $map) { | protected function getModernLintDictionary(array $map) { | ||||
$map = $this->getModernCommonDictionary($map); | $map = $this->getModernCommonDictionary($map); | ||||
return $map; | return $map; | ||||
} | } | ||||
protected function getModernUnitDictionary(array $map) { | protected function getModernUnitDictionary(array $map) { | ||||
$map = $this->getModernCommonDictionary($map); | $map = $this->getModernCommonDictionary($map); | ||||
$details = idx($map, 'userData'); | $details = idx($map, 'userData', ''); | ||||
if (strlen($details)) { | if (strlen($details)) { | ||||
$map['details'] = (string)$details; | $map['details'] = (string)$details; | ||||
} | } | ||||
unset($map['userData']); | unset($map['userData']); | ||||
return $map; | return $map; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 213 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0