5.22.0
Changes
- Convert hook stdIn to cmd option
- Add confirmation action
- Hook script compatibility check
- BlockFixupCommits action got some verbose output
⚠️ Attention ⚠️
This version contains a bigger change that requires to update the generated hook scripts.
This is necessary because the decision was made to convert the original hook stdIn
to a cmd option --input
to allow prompting the user for input for all hooks as long as a tty
is available.
A new Action
was added to ask users if they want to continue with the current git operation. The action uses event handler to make sure that users are only bothered to input something if the hook succeeds. Both options are optional and can be skipped.
{
"action": "\\CaptainHook\\App\\Hook\\UserInput\\AskConfirmation",
"options": {
"message": "Do you really want it? [yes|no]",
"default": true
},
"config": {
"label": "User confirmation!"
}
}
Short note: This action does not work in GUI tools like Sourcetree, or PHPStorm because they fail to forward the tty
properly.
User input should be possible for all hooks now as long as you use run-mode
shell
(default) or docker
. In run-mode
php
user input does not work for pre-push
and post-rewrite
because data can not be read from stdIn
and tty
at the same time and both hooks require stdIn
data to work properly.