src/Hooks/PrePush.php
public function prePush(string $destinationName, string $destinationLocation, InputInterface $input, OutputInterface $output, ParameterBagInterface $configuration): bool
    {
        if ('Fail' === $destinationName) {
            return false;
        }

        // We can write to the console, with data we got
        $output->writeln([
            'Destination is: '.$destinationName,
            'Location is: '.$destinationLocation,
        ]);

        return true;
    }
public function prePush(string $destinationName, string $destinationLocation, InputInterface $input, OutputInterface $output, ParameterBagInterface $configuration): bool
    {
        if ('Fail' === $destinationName) {
            return false;
        }

        // We can write to the console, with data we got
        $output->writeln([
            'Destination is: '.$destinationName,
            'Location is: '.$destinationLocation,
        ]);

        return true;
    }
public function prePush ( string $ destinationName , string $ destinationLocation , InputInterface $ input , OutputInterface $ output , ParameterBagInterface $ configuration ) : bool { if ( 'Fail' === $ destinationName ) { return false ; } // We can write to the console, with data we got $ output -> writeln ( [ 'Destination is: ' . $ destinationName , 'Location is: ' . $ destinationLocation , ] ) ; return true ; }
Called prior to a push to a remote.

Returning false aborts the push.

@param string                $destinationName     Git remote name
@param string                $destinationLocation Git remote uri
@param InputInterface        $input
@param OutputInterface       $output
@param ParameterBagInterface $configuration

@return bool
Called prior to a push to a remote .