A php proxy to fetch github status changes
GPL-3.0 License
A php proxy to fetch github status changes.
This collection of scripts is used to work as a receiver for GitHub's POST requests ( push hooks ) and as a scheduler for behind-firewall integration clients.
It stores the received events in a round-robin sqlite3 database.
Requires
php-sqlite3
(SQLite3)php-curl
php-mbstring
Recommented
sqlite3
Prepare:
create hook:
curl -i -u :user -d \
'{"name": "web", "active": true, "events": ["push", "pull_request"], \
"config": {"url": "https://github:[email protected]", "content_type": "form"}}' \
https://api.github.com/repos/:user/:repo/hooks
create a tooken for the config.php
-> access_token
:
curl -i -u :user -d \
'{"scopes": ["repo:status","read:org"], "note": ["GitHub Proxy"], "note_url": ["yourUrl"]}' \
https://api.github.com/authorizations
create two random secrets:
config.php
-> $client_secret
config.php
-> statusSalt
apg -m 20
This code is licensed under the GPLv3+. See LICENSE for more details.
pull request
gets an update, do not schedule the old commits that are still in received
-stateindex.php
-> testClient.php
test
table as soon as an eventtests
only via the event
MVC objectcommit
and pull
and de-clutter event
table<pre ...><?php htmlentities($text, ENT_COMPAT, 'UTF-8'); ?> </pre>