pruno/github-webhooks
Composer 安装命令:
composer require pruno/github-webhooks
包简介
Utility to handle multiple Github web-hooks on the same platform
README 文档
README
Github Webhooks Library (with events support).
Introduction
This library aims to provide:
-
A simple and embeddable event-based library
-
A handy stand-alone server class
-
An event listener to perform
git pull- Support multiple deploy key
- NOTE: Linux only
Requirements
- php >=5.3.3
Optionally:
- git (to use the Pull event listener)
Installation
Using composer:
Add the following to your composer.json file:
"require": {
"pruno/github-webhooks": "2.0.*",
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/pruno/github-webhooks.git"
}
]
Alternately with git submodules:
git submodule add https://github.com/pruno/github-webhooks.git pruno/github-webhooks
Quick implementation (Pull on Push event)
1 - Create a Github Webhook:
- 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.
2 - Run composer install.
3 - Copy sample/index.php to your public directory.
4 - Edir sample/index.php with:
- hook information (line 9).
- git working copy information (line 14).
5 - You may remove line 12 once finished.
Notice:
Remember that the user who is running your webserver (or fast-cgi process) need to have write permissions on your git working copy.
Embedding
Refer to library/GithubWebhooks/Server.php as an example implementation.
Contribute
Please do. Fork it and send pull requests.
License
This software is released under the New-BSD License.
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2014-02-18