itzbund / captainhook-hooks
CaptainHook hooks for GSB11
v1.0.1
2024-03-01 08:51 UTC
Requires
- php: >=8.0
Requires (Dev)
- captainhook/captainhook: ^5.21
- ergebnis/composer-normalize: ^2.28
- friendsofphp/php-cs-fixer: ^3.14
This package is auto-updated.
Last update: 2024-11-22 08:47:57 UTC
README
CaptainHook Hooks
This repository contains a collection of hooks for CaptainHook.
Installation and Setup
Add our package registry to your composer.json
composer config repositories.63 composer https://git.gsb-itzbund.de/api/v4/group/63/-/packages/composer/packages.json
Open CoDE
composer config repositories.captainhook-hooks vcs https://gitlab.opencode.de/bmi/government-site-builder-11/extensions/captainhook-hooks
Login to our package registry (git.gsb-itzbund.de only)
(use your GitLab credentials)
composer config gitlab-token.git.gsb-itzbund.de <personal_access_token>
Using a deploy token:
composer config gitlab-token.git.gsb-itzbund.de <deploy_token_username> <deploy_token>
Using a CI/CD job token: (in gitlab ci - git.gsb-itzbund.de jobs only):
composer config -- gitlab-token.git.gsb-itzbund.de gitlab-ci-token $CI_JOB_TOKEN
Add the package to your project
composer require --dev captainhook/captainhook-phar composer require --dev ramsey/conventional-commits composer require --dev itzbund/captainhook-hooks # optionally composer require --dev captainhook/hook-installer
Add Hook into your Config Example:
"commit-msg": { "enabled": true, "actions": [ { "action": "\\Ramsey\\CaptainHook\\ValidateConventionalCommit", "options": { "config": { "requiredFooters": [ "Refs" ] } }, "conditions": [ { "exec": "\\ITZBund\\CaptainHookHooks\\HookConditions\\NotMergeOrRevert" } ] } ] },
Install the hooks
vendor/bin/captainhook install
or if packages are installed under
.composer/
./.composer/bin/captainhook install --no-interaction --force -b .composer/vendor/autoload.php commit-msg