Allow configuring gitlab deploy tokens via config command, refs #9373
parent
04aad524ec
commit
fc0d724938
|
@ -703,6 +703,9 @@ EOT
|
|||
}
|
||||
$this->configSource->removeConfigSetting($matches[1].'.'.$matches[2]);
|
||||
$this->authConfigSource->addConfigSetting($matches[1].'.'.$matches[2], array('consumer-key' => $values[0], 'consumer-secret' => $values[1]));
|
||||
} elseif ($matches[1] === 'gitlab-token' && 2 === count($values)) {
|
||||
$this->configSource->removeConfigSetting($matches[1].'.'.$matches[2]);
|
||||
$this->authConfigSource->addConfigSetting($matches[1].'.'.$matches[2], array('username' => $values[0], 'token' => $values[1]));
|
||||
} elseif (in_array($matches[1], array('github-oauth', 'gitlab-oauth', 'gitlab-token', 'bearer'), true)) {
|
||||
if (1 !== count($values)) {
|
||||
throw new \RuntimeException('Too many arguments, expected only one token');
|
||||
|
|
Loading…
Reference in New Issue