2017 © Pedro PelĂĄez
 

library github-webhooks

Utility to handle multiple Github web-hooks on the same platform

image

pruno/github-webhooks

Utility to handle multiple Github web-hooks on the same platform

  • Tuesday, February 18, 2014
  • by pruno
  • Repository
  • 3 Watchers
  • 5 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Github WebHooks 2.0.0 Build Status Latest Stable Version

Github Webhooks Library (with events support)., (*1)

Introduction

This library aims to provide:, (*2)

  • A simple and embeddable event-based library, (*3)

  • A handy stand-alone server class, (*4)

  • An event listener to perform git pull, (*5)

    • Support multiple deploy key
    • NOTE: Linux only

Requirements

  • php >=5.3.3

Optionally:, (*6)

  • git (to use the Pull event listener)

Installation

Using composer:, (*7)

Add the following to your composer.json file:, (*8)

"require": {
    "pruno/github-webhooks": "2.0.*",
},
"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/pruno/github-webhooks.git"
    }
]

Alternately with git submodules:, (*9)

git submodule add https://github.com/pruno/github-webhooks.git pruno/github-webhooks

Quick implementation (Pull on Push event)

1 - Create a Github Webhook:, (*10)

 - Set an arbitrary URL path (this will be your hook id) 
   (e.g: https://example.com/POSTRECEIVE)
 - Both payload versions are supported.
 - The push event is enough.

1 - Copy sample/composer.json to your project root directory., (*11)

2 - Run composer install., (*12)

3 - Copy sample/index.php to your public directory., (*13)

4 - Edir sample/index.php with:, (*14)

 - hook information (line 9).
 - git working copy information (line 14).

5 - You may remove line 12 once finished., (*15)

Notice:
Remember that the user who is running your webserver (or fast-cgi process) need to have write permissions on your git working copy., (*16)

Embedding

Refer to library/GithubWebhooks/Server.php as an example implementation., (*17)

Contribute

Please do. Fork it and send pull requests., (*18)

License

This software is released under the New-BSD License., (*19)

The Versions

18/02 2014

dev-master

9999999-dev https://github.com/pruno/github-hooks

Utility to handle multiple Github web-hooks on the same platform

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

git github webhook

18/02 2014

2.0.0

2.0.0.0 https://github.com/pruno/github-hooks

Utility to handle multiple Github web-hooks on the same platform

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

git github webhook

18/02 2014

dev-develop

dev-develop https://github.com/pruno/github-hooks

Utility to handle multiple Github web-hooks on the same platform

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

git github webhook

20/01 2014

1.0.0

1.0.0.0 https://github.com/pruno/github-hooks

Utility to handle multiple Github web-hooks on the same platform

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

git github