Git related helpers classes.

1.x-dev 2024-12-22 14:31 UTC

This package is auto-updated.

Last update: 2024-12-23 14:49:02 UTC


README

CircleCI codecov

stdInput reader

stdInput reader - Supported Git hooks

stdInput reader - Usage

.git/hooks/pre-receive

#!/usr/bin/env php
<?php

use Sweetchuck\Git\StdInputReader\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;
}