fikt / phergie-irc-plugin-react-githubhooks
Phergie plugin for Listen for GitHub webhooks, announce events on IRC.
Requires
- php: >=5.3.0
- phergie/phergie-irc-bot-react: ~1
- react/http: dev-master
Requires (Dev)
- phake/phake: 2.0.0-beta2
- phergie/phergie-irc-plugin-react-autojoin: ^1.1
- phergie/phergie-irc-plugin-react-pong: ^1.1
- phpdocumentor/phpdocumentor: ^2.8
- phpunit/phpunit: 4.5.*
This package is not auto-updated.
Last update: 2024-11-13 19:21:01 UTC
README
Phergie plugin for GitHub webhooks, listen for events and announce them on IRC.
What does it do?
This plugin listens for incoming webhooks from GitHub, and announces events on IRC.
These events are not just triggered on push, but also on issue updates, pull requests, comments and more, you can even get status updates from jenkins/travis-ci builds and changes to the wiki.
Check out Event Type & Payloads in the GitHub API documentation for detailed information about every single event.
How it works
The plugin listens for incoming hooks on port 8080 (configurable), it then emits an event when it receives one. The standard event handler then acts upon that event, and announces the event on IRC.
Install & Configuration
See Phergie documentation for more information on installing and enabling plugins.
Phergie plugin configuration
Hook name corresponds to webhook request path.
return [ // ... connection info goes here // Plugin configuration 'plugins' => [ // GitHubHooks configuration new \Fikt\Phergie\Irc\Plugin\React\GitHubHooks\Plugin([ 'channels' => ['#some-channel'], // Channel list, broadcast events to these channels 'events' => ['*'], // Events to broadcast, '*' for all events. 'secret' => 'My super secret shared key', // Optional (but recommended) secret key, used to verify the message is actually from GitHub /** * Array of webhooks, key corresponds to the webhook request path */ 'hooks' => [ 'githubhooks' => [], // Use global configuration 'fikt' => [ 'channels' => ['#some-private-channel'], // Override global configuration 'secret' => 'My other super secret key', // Override global configuration ], ], ]), ], ];
Tests
To run the unit test suite do composer test
License
Released under the BSD License. See LICENSE
.