Changeset View
Changeset View
Standalone View
Standalone View
src/toolset/workflow/ArcanistAliasWorkflow.php
Show First 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | private function runDeleteAlias($alias) { | ||||
// TOOLSETS: Actually delete aliases. | // TOOLSETS: Actually delete aliases. | ||||
return 1; | return 1; | ||||
} | } | ||||
private function runCreateAlias(array $argv) { | private function runCreateAlias(array $argv) { | ||||
$trigger = array_shift($argv); | $trigger = array_shift($argv); | ||||
$this->validateAliasTrigger($trigger); | $this->validateAliasTrigger($trigger); | ||||
$alias = id(new ArcanistAlias()) | $alias = (new ArcanistAlias()) | ||||
->setToolset($this->getToolsetKey()) | ->setToolset($this->getToolsetKey()) | ||||
->setTrigger($trigger) | ->setTrigger($trigger) | ||||
->setCommand($argv); | ->setCommand($argv); | ||||
$aliases = $this->readAliasesForWrite(); | $aliases = $this->readAliasesForWrite(); | ||||
// TOOLSETS: Check if the user already has an alias for this trigger, and | // TOOLSETS: Check if the user already has an alias for this trigger, and | ||||
// prompt them to overwrite it. Needs prompting to work. | // prompt them to overwrite it. Needs prompting to work. | ||||
▲ Show 20 Lines • Show All 57 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