Changeset View
Changeset View
Standalone View
Standalone View
src/configuration/ArcanistConfiguration.php
| Show All 11 Lines | |||||
| * | * | ||||
| * - create, replace, or disable workflows by overriding buildWorkflow() | * - create, replace, or disable workflows by overriding buildWorkflow() | ||||
| * and buildAllWorkflows(); | * and buildAllWorkflows(); | ||||
| * - add additional steps before or after workflows run by overriding | * - add additional steps before or after workflows run by overriding | ||||
| * willRunWorkflow() or didRunWorkflow() or didAbortWorkflow(); and | * willRunWorkflow() or didRunWorkflow() or didAbortWorkflow(); and | ||||
| * - add new flags to existing workflows by overriding | * - add new flags to existing workflows by overriding | ||||
| * getCustomArgumentsForCommand(). | * getCustomArgumentsForCommand(). | ||||
| * | * | ||||
| * @group config | |||||
| * @concrete-extensible | * @concrete-extensible | ||||
| */ | */ | ||||
| class ArcanistConfiguration { | class ArcanistConfiguration { | ||||
| public function buildWorkflow($command) { | public function buildWorkflow($command) { | ||||
| if ($command == '--help') { | if ($command == '--help') { | ||||
| // Special-case "arc --help" to behave like "arc help" instead of telling | // Special-case "arc --help" to behave like "arc help" instead of telling | ||||
| // you to type "arc help" without being helpful. | // you to type "arc help" without being helpful. | ||||
| Show All 31 Lines | class ArcanistConfiguration { | ||||
| final public function isValidWorkflow($workflow) { | final public function isValidWorkflow($workflow) { | ||||
| return (bool)$this->buildWorkflow($workflow); | return (bool)$this->buildWorkflow($workflow); | ||||
| } | } | ||||
| public function willRunWorkflow($command, ArcanistBaseWorkflow $workflow) { | public function willRunWorkflow($command, ArcanistBaseWorkflow $workflow) { | ||||
| // This is a hook. | // This is a hook. | ||||
| } | } | ||||
| public function didRunWorkflow($command, ArcanistBaseWorkflow $workflow, | public function didRunWorkflow( | ||||
| $command, | |||||
| ArcanistBaseWorkflow $workflow, | |||||
| $err) { | $err) { | ||||
| // This is a hook. | // This is a hook. | ||||
| } | } | ||||
| public function didAbortWorkflow($command, $workflow, Exception $ex) { | public function didAbortWorkflow($command, $workflow, Exception $ex) { | ||||
| // This is a hook. | // This is a hook. | ||||
| } | } | ||||
| public function getCustomArgumentsForCommand($command) { | public function getCustomArgumentsForCommand($command) { | ||||
| ▲ Show 20 Lines • Show All 191 Lines • Show Last 20 Lines | |||||