sweetchuck / git-hooks-stdinput-reader
Read and parse the StdInput of Git hooks
Installs: 97 817
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=7.2
Requires (Dev)
- phpunit/phpunit: ^8.5
- squizlabs/php_codesniffer: ^3.5
- sweetchuck/git-hooks: ^0.0
- sweetchuck/robo-git: ^0.2
- sweetchuck/robo-phpcs: ^0.1
- sweetchuck/robo-phpmd: ^0.1
This package is auto-updated.
Last update: 2024-11-06 21:10:12 UTC
README
Supported Git hooks
Usage
.git/hooks/pre-receive
#!/usr/bin/env php <?php use Sweetchuck\GitHooksStdInputReader\PreReceiveReader; $reader = new PreReceiveReader(STDIN); foreach ($reader as $item) { echo 'Old value: ', $item->oldValue, PHP_EOL; echo 'New value: ', $item->newValue, PHP_EOL; echo 'Ref name: ', $item->refName, PHP_EOL; echo '-----------', PHP_EOL; }