Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistWorkflow.php
- This file was copied from src/workflow/ArcanistBaseWorkflow.php.
| Show All 29 Lines | |||||
| * | * | ||||
| * | * | ||||
| * @task conduit Conduit | * @task conduit Conduit | ||||
| * @task scratch Scratch Files | * @task scratch Scratch Files | ||||
| * @task phabrep Phabricator Repositories | * @task phabrep Phabricator Repositories | ||||
| * | * | ||||
| * @stable | * @stable | ||||
| */ | */ | ||||
| abstract class ArcanistBaseWorkflow extends Phobject { | abstract class ArcanistWorkflow extends Phobject { | ||||
| const COMMIT_DISABLE = 0; | const COMMIT_DISABLE = 0; | ||||
| const COMMIT_ALLOW = 1; | const COMMIT_ALLOW = 1; | ||||
| const COMMIT_ENABLE = 2; | const COMMIT_ENABLE = 2; | ||||
| const AUTO_COMMIT_TITLE = 'Automatic commit by arc'; | const AUTO_COMMIT_TITLE = 'Automatic commit by arc'; | ||||
| private $commitMode = self::COMMIT_DISABLE; | private $commitMode = self::COMMIT_DISABLE; | ||||
| Show All 34 Lines | abstract class ArcanistWorkflow extends Phobject { | ||||
| abstract public function run(); | abstract public function run(); | ||||
| /** | /** | ||||
| * Finalizes any cleanup operations that need to occur regardless of | * Finalizes any cleanup operations that need to occur regardless of | ||||
| * whether the command succeeded or failed. | * whether the command succeeded or failed. | ||||
| */ | */ | ||||
| public function finalize() { | public function finalize() { | ||||
| // TODO: Remove this once ArcanistBaseWorkflow is gone. | |||||
| if ($this instanceof ArcanistBaseWorkflow) { | |||||
| phutil_deprecated( | |||||
| 'ArcanistBaseWorkflow', | |||||
epriestley: Oh, this will raise `ArcanistWorkflow`, not `ArcanistBaseWorkflow`. | |||||
Not Done Inline ActionsOh whoops.. I had this code in ArcanistBaseWorkflow and then blindly moved it here. joshuaspence: Oh whoops.. I had this code in `ArcanistBaseWorkflow` and then blindly moved it here. | |||||
| 'You should extend from `ArcanistWorkflow` instead.'); | |||||
| } | |||||
| $this->finalizeWorkingCopy(); | $this->finalizeWorkingCopy(); | ||||
| } | } | ||||
| /** | /** | ||||
| * Return the command used to invoke this workflow from the command like, | * Return the command used to invoke this workflow from the command like, | ||||
| * e.g. "help" for @{class:ArcanistHelpWorkflow}. | * e.g. "help" for @{class:ArcanistHelpWorkflow}. | ||||
| * | * | ||||
| * @return string The command a user types to invoke this workflow. | * @return string The command a user types to invoke this workflow. | ||||
| ▲ Show 20 Lines • Show All 1,695 Lines • Show Last 20 Lines | |||||
Oh, this will raise ArcanistWorkflow, not ArcanistBaseWorkflow.