| @@ 24-45 (lines=22) @@ | ||
| 21 | * @link https://github.com/captainhookphp/captainhook |
|
| 22 | * @since Class available since Release 4.1.0 |
|
| 23 | */ |
|
| 24 | class PostCheckout extends Hook |
|
| 25 | { |
|
| 26 | /** |
|
| 27 | * Hook to execute. |
|
| 28 | * |
|
| 29 | * @var string |
|
| 30 | */ |
|
| 31 | protected $name = Hooks::POST_CHECKOUT; |
|
| 32 | ||
| 33 | /** |
|
| 34 | * Configure the command |
|
| 35 | * |
|
| 36 | * @return void |
|
| 37 | */ |
|
| 38 | protected function configure() : void |
|
| 39 | { |
|
| 40 | parent::configure(); |
|
| 41 | $this->addArgument('previousHead', InputArgument::OPTIONAL, 'Previous HEAD'); |
|
| 42 | $this->addArgument('newHead', InputArgument::OPTIONAL, 'New HEAD'); |
|
| 43 | $this->addArgument('mode', InputArgument::OPTIONAL, 'Checkout mode 1 branch 0 file'); |
|
| 44 | } |
|
| 45 | } |
|
| 46 | ||
| @@ 24-45 (lines=22) @@ | ||
| 21 | * @link https://github.com/captainhookphp/captainhook |
|
| 22 | * @since Class available since Release 3.1.0 |
|
| 23 | */ |
|
| 24 | class PrepareCommitMsg extends Hook |
|
| 25 | { |
|
| 26 | /** |
|
| 27 | * Hook to execute |
|
| 28 | * |
|
| 29 | * @var string |
|
| 30 | */ |
|
| 31 | protected $name = Hooks::PREPARE_COMMIT_MSG; |
|
| 32 | ||
| 33 | /** |
|
| 34 | * Configure the command |
|
| 35 | * |
|
| 36 | * @return void |
|
| 37 | */ |
|
| 38 | protected function configure() : void |
|
| 39 | { |
|
| 40 | parent::configure(); |
|
| 41 | $this->addArgument('file', InputArgument::REQUIRED, 'File containing the commit log message'); |
|
| 42 | $this->addArgument('mode', InputArgument::OPTIONAL, 'Current commit mode'); |
|
| 43 | $this->addArgument('hash', InputArgument::OPTIONAL, 'Given commit hash'); |
|
| 44 | } |
|
| 45 | } |
|
| 46 | ||
| @@ 24-44 (lines=21) @@ | ||
| 21 | * @link https://github.com/captainhookphp/captainhook |
|
| 22 | * @since Class available since Release 0.9.0 |
|
| 23 | */ |
|
| 24 | class PrePush extends Hook |
|
| 25 | { |
|
| 26 | /** |
|
| 27 | * Hook to execute. |
|
| 28 | * |
|
| 29 | * @var string |
|
| 30 | */ |
|
| 31 | protected $name = Hooks::PRE_PUSH; |
|
| 32 | ||
| 33 | /** |
|
| 34 | * Configure the command |
|
| 35 | * |
|
| 36 | * @return void |
|
| 37 | */ |
|
| 38 | protected function configure() : void |
|
| 39 | { |
|
| 40 | parent::configure(); |
|
| 41 | $this->addArgument('target', InputArgument::OPTIONAL, 'Target repository name'); |
|
| 42 | $this->addArgument('url', InputArgument::OPTIONAL, 'Target repository url'); |
|
| 43 | } |
|
| 44 | } |
|
| 45 | ||