GitHubWebhooks

Laravel Package that listens to GitHub webhook events and responds by creating Statuses in GitHub

Installation

Install Package via Composer

composer require mecodeninja/githubwebhooks:^1.0

Publish the Package Config

php artisan vendor:publish --provider="MeCodeNinja\GitHubWebhooks\GitHubWebhooksServiceProvider"

Configure the Checks to be performed on your repository by editing %storage%/app/githubwebhooks-config.yaml

nano storage/app/githubwebhooks-config.yaml

Set name to your github repository

repositories:
  -
    name: willwright/githubwebhooks
    token: %mytoken%
    checks:
      BranchCheck:
        branches: [origin/develop]
      PathCheck:
        paths: [/^vendor\//]

The name of the repository must match the repo.full_name in the payload sent by the GitHub Webhook in order to activate the Check(s).

Set token to a Personal access token which was generated by you in GitHub. See: https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line Token needs: repo (If your Repository is Private) repo > public_repo (If your Repository is Public)

Warning

Do not commit githubwebhooks-config.yaml to your SVN. It contains sensative information