PHP code example of sunkan / git-webhooks

1. Go to this page and download the library: Download sunkan/git-webhooks library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sunkan / git-webhooks example snippets


use DavidBadura\GitWebhooks\EventFactory;

$request = Psr17Factory::createFromGlobals();
$factory = EventFactory::createDefault();

if ($event = $factory->create($request)) {
    // ...
}