A collection of useful conditions and actions to be used with CaptainHook.
Given that you already have CaptainHook in your project you can simply use Composer to have these webgriffe/captainhook actions available:
composer require --dev webgriffe/captainhookHere follows the list of implemented actions.
For example, you can prevent forced push on master branch with the following CaptainHook's config:
// captainhook.json
// ...
"pre-push": {
"enabled": true,
"actions": [
{
"action": "\\Webgriffe\\CaptainHook\\PreventPushForce",
"options": {"protected-branches": ["master"]}
}
]
}
// ...You can use the protected-branches option to add other branches to the protected branches list.
// captainhook.json
// ...
"commit-msg": {
"enabled": true,
"actions": [
{
"action": "\\Webgriffe\\CaptainHook\\PreventCommitMessageWithDiff"
}
]
},
// ... // captainhook.json
// ...
"commit-msg": {
"enabled": true,
"actions": [
{
"action": "\\Webgriffe\\CaptainHook\\PreventCommitCaseSensitiveSameFilename"
}
]
},
// ...This library is under the MIT license. See the complete license in the LICENSE file.
Developed by Webgriffe®.