forked from the-distro/ofborg
Remove extra libs now that the mass rebuild filter isn't PHP anymore
This commit is contained in:
parent
6e305e16aa
commit
08a0a79976
10
README.md
10
README.md
|
@ -214,13 +214,9 @@ function rabbitmq_conn($timeout = 3) {
|
||||||
return $connection;
|
return $connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
function gh_client() {
|
function gh_secret() {
|
||||||
$client = new \Github\Client();
|
return "github webhook secret";
|
||||||
$client->authenticate('githubusername',
|
|
||||||
'githubpassword',
|
|
||||||
Github\Client::AUTH_HTTP_PASSWORD);
|
|
||||||
|
|
||||||
return $client;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
{
|
{
|
||||||
"require": {
|
"require": {
|
||||||
"php-amqplib/php-amqplib": ">=2.6.1",
|
"php-amqplib/php-amqplib": ">=2.6.1"
|
||||||
"knplabs/github-api": "^2.6@dev",
|
|
||||||
"php-http/guzzle6-adapter": "^1.2@dev"
|
|
||||||
},
|
},
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
|
936
php/composer.lock
generated
936
php/composer.lock
generated
|
@ -4,321 +4,20 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "0ee26122485b777e3ea752a8d5da0c61",
|
"content-hash": "dc3ed822ebc471c3f81c3a8a787af555",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
|
||||||
"name": "clue/stream-filter",
|
|
||||||
"version": "v1.4.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/clue/php-stream-filter.git",
|
|
||||||
"reference": "d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/clue/php-stream-filter/zipball/d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0",
|
|
||||||
"reference": "d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.3"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": "^5.0 || ^4.8"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Clue\\StreamFilter\\": "src/"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"src/functions.php"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Christian Lück",
|
|
||||||
"email": "christian@lueck.tv"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "A simple and modern approach to stream filtering in PHP",
|
|
||||||
"homepage": "https://github.com/clue/php-stream-filter",
|
|
||||||
"keywords": [
|
|
||||||
"bucket brigade",
|
|
||||||
"callback",
|
|
||||||
"filter",
|
|
||||||
"php_user_filter",
|
|
||||||
"stream",
|
|
||||||
"stream_filter_append",
|
|
||||||
"stream_filter_register"
|
|
||||||
],
|
|
||||||
"time": "2017-08-18T09:54:01+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "guzzlehttp/guzzle",
|
|
||||||
"version": "6.3.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/guzzle/guzzle.git",
|
|
||||||
"reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699",
|
|
||||||
"reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"guzzlehttp/promises": "^1.0",
|
|
||||||
"guzzlehttp/psr7": "^1.4",
|
|
||||||
"php": ">=5.5"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"ext-curl": "*",
|
|
||||||
"phpunit/phpunit": "^4.0 || ^5.0",
|
|
||||||
"psr/log": "^1.0"
|
|
||||||
},
|
|
||||||
"suggest": {
|
|
||||||
"psr/log": "Required for using the Log middleware"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "6.2-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"files": [
|
|
||||||
"src/functions_include.php"
|
|
||||||
],
|
|
||||||
"psr-4": {
|
|
||||||
"GuzzleHttp\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Michael Dowling",
|
|
||||||
"email": "mtdowling@gmail.com",
|
|
||||||
"homepage": "https://github.com/mtdowling"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Guzzle is a PHP HTTP client library",
|
|
||||||
"homepage": "http://guzzlephp.org/",
|
|
||||||
"keywords": [
|
|
||||||
"client",
|
|
||||||
"curl",
|
|
||||||
"framework",
|
|
||||||
"http",
|
|
||||||
"http client",
|
|
||||||
"rest",
|
|
||||||
"web service"
|
|
||||||
],
|
|
||||||
"time": "2017-06-22T18:50:49+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "guzzlehttp/promises",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/guzzle/promises.git",
|
|
||||||
"reference": "2e48ae638dc0bf0849772f5590835fcd700a2e1d"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/2e48ae638dc0bf0849772f5590835fcd700a2e1d",
|
|
||||||
"reference": "2e48ae638dc0bf0849772f5590835fcd700a2e1d",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.5.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": "^4.8.36"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.4-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"GuzzleHttp\\Promise\\": "src/"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"src/functions_include.php"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Michael Dowling",
|
|
||||||
"email": "mtdowling@gmail.com",
|
|
||||||
"homepage": "https://github.com/mtdowling"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Guzzle promises library",
|
|
||||||
"keywords": [
|
|
||||||
"promise"
|
|
||||||
],
|
|
||||||
"time": "2017-12-07T21:04:15+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "guzzlehttp/psr7",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/guzzle/psr7.git",
|
|
||||||
"reference": "d2537c86fa8b004c29e9b9f5e10028f0a29df101"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/d2537c86fa8b004c29e9b9f5e10028f0a29df101",
|
|
||||||
"reference": "d2537c86fa8b004c29e9b9f5e10028f0a29df101",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.4.0",
|
|
||||||
"psr/http-message": "~1.0"
|
|
||||||
},
|
|
||||||
"provide": {
|
|
||||||
"psr/http-message-implementation": "1.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": "~4.0"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.4-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"GuzzleHttp\\Psr7\\": "src/"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"src/functions_include.php"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Michael Dowling",
|
|
||||||
"email": "mtdowling@gmail.com",
|
|
||||||
"homepage": "https://github.com/mtdowling"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Tobias Schultze",
|
|
||||||
"homepage": "https://github.com/Tobion"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "PSR-7 message implementation that also provides common utility methods",
|
|
||||||
"keywords": [
|
|
||||||
"http",
|
|
||||||
"message",
|
|
||||||
"request",
|
|
||||||
"response",
|
|
||||||
"stream",
|
|
||||||
"uri",
|
|
||||||
"url"
|
|
||||||
],
|
|
||||||
"time": "2017-10-07T03:19:56+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "knplabs/github-api",
|
|
||||||
"version": "2.7.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/KnpLabs/php-github-api.git",
|
|
||||||
"reference": "d445f1eec4788763315c3c96a214db4e149f9deb"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/KnpLabs/php-github-api/zipball/d445f1eec4788763315c3c96a214db4e149f9deb",
|
|
||||||
"reference": "d445f1eec4788763315c3c96a214db4e149f9deb",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": "^5.6 || ^7.0",
|
|
||||||
"php-http/cache-plugin": "^1.4",
|
|
||||||
"php-http/client-common": "^1.3",
|
|
||||||
"php-http/client-implementation": "^1.0",
|
|
||||||
"php-http/discovery": "^1.0",
|
|
||||||
"php-http/httplug": "^1.1",
|
|
||||||
"psr/cache": "^1.0",
|
|
||||||
"psr/http-message": "^1.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"cache/array-adapter": "^0.4",
|
|
||||||
"guzzlehttp/psr7": "^1.2",
|
|
||||||
"php-http/guzzle6-adapter": "^1.0",
|
|
||||||
"php-http/mock-client": "^1.0",
|
|
||||||
"phpunit/phpunit": "^5.5 || ^6.0",
|
|
||||||
"sllh/php-cs-fixer-styleci-bridge": "^1.3"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "2.6.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Github\\": "lib/Github/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Thibault Duplessis",
|
|
||||||
"email": "thibault.duplessis@gmail.com",
|
|
||||||
"homepage": "http://ornicar.github.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "KnpLabs Team",
|
|
||||||
"homepage": "http://knplabs.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "GitHub API v3 client",
|
|
||||||
"homepage": "https://github.com/KnpLabs/php-github-api",
|
|
||||||
"keywords": [
|
|
||||||
"api",
|
|
||||||
"gh",
|
|
||||||
"gist",
|
|
||||||
"github"
|
|
||||||
],
|
|
||||||
"time": "2017-12-12T20:14:04+00:00"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "php-amqplib/php-amqplib",
|
"name": "php-amqplib/php-amqplib",
|
||||||
"version": "dev-master",
|
"version": "dev-master",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/php-amqplib/php-amqplib.git",
|
"url": "https://github.com/php-amqplib/php-amqplib.git",
|
||||||
"reference": "0f90b3d8bc50403458f0eefbcba7d1e2329dd0f6"
|
"reference": "dfd3694a86f1a7394d3693485259d4074a6ec79b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/0f90b3d8bc50403458f0eefbcba7d1e2329dd0f6",
|
"url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/dfd3694a86f1a7394d3693485259d4074a6ec79b",
|
||||||
"reference": "0f90b3d8bc50403458f0eefbcba7d1e2329dd0f6",
|
"reference": "dfd3694a86f1a7394d3693485259d4074a6ec79b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -330,6 +29,7 @@
|
||||||
"videlalvaro/php-amqplib": "self.version"
|
"videlalvaro/php-amqplib": "self.version"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
"phpdocumentor/phpdocumentor": "^2.9",
|
||||||
"phpunit/phpunit": "^4.8",
|
"phpunit/phpunit": "^4.8",
|
||||||
"scrutinizer/ocular": "^1.1",
|
"scrutinizer/ocular": "^1.1",
|
||||||
"squizlabs/php_codesniffer": "^2.5"
|
"squizlabs/php_codesniffer": "^2.5"
|
||||||
|
@ -350,7 +50,7 @@
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"LGPL-2.1"
|
"LGPL-2.1-or-later"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
@ -375,633 +75,13 @@
|
||||||
"queue",
|
"queue",
|
||||||
"rabbitmq"
|
"rabbitmq"
|
||||||
],
|
],
|
||||||
"time": "2017-09-26T05:30:15+00:00"
|
"time": "2018-02-11T19:28:00+00:00"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "php-http/cache-plugin",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/php-http/cache-plugin.git",
|
|
||||||
"reference": "c573ac6ea9b4e33fad567f875b844229d18000b9"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/php-http/cache-plugin/zipball/c573ac6ea9b4e33fad567f875b844229d18000b9",
|
|
||||||
"reference": "c573ac6ea9b4e33fad567f875b844229d18000b9",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": "^5.4 || ^7.0",
|
|
||||||
"php-http/client-common": "^1.1",
|
|
||||||
"php-http/message-factory": "^1.0",
|
|
||||||
"psr/cache": "^1.0",
|
|
||||||
"symfony/options-resolver": "^2.6 || ^3.0 || ^4.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"henrikbjorn/phpspec-code-coverage": "^1.0",
|
|
||||||
"phpspec/phpspec": "^2.5"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.5-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Http\\Client\\Common\\Plugin\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Márk Sági-Kazár",
|
|
||||||
"email": "mark.sagikazar@gmail.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "PSR-6 Cache plugin for HTTPlug",
|
|
||||||
"homepage": "http://httplug.io",
|
|
||||||
"keywords": [
|
|
||||||
"cache",
|
|
||||||
"http",
|
|
||||||
"httplug",
|
|
||||||
"plugin"
|
|
||||||
],
|
|
||||||
"time": "2017-11-29T20:45:41+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "php-http/client-common",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/php-http/client-common.git",
|
|
||||||
"reference": "9accb4a082eb06403747c0ffd444112eda41a0fd"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/php-http/client-common/zipball/9accb4a082eb06403747c0ffd444112eda41a0fd",
|
|
||||||
"reference": "9accb4a082eb06403747c0ffd444112eda41a0fd",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": "^5.4 || ^7.0",
|
|
||||||
"php-http/httplug": "^1.1",
|
|
||||||
"php-http/message": "^1.6",
|
|
||||||
"php-http/message-factory": "^1.0",
|
|
||||||
"symfony/options-resolver": "^2.6 || ^3.0 || ^4.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"guzzlehttp/psr7": "^1.4",
|
|
||||||
"phpspec/phpspec": "^2.5 || ^3.4 || ^4.2"
|
|
||||||
},
|
|
||||||
"suggest": {
|
|
||||||
"php-http/cache-plugin": "PSR-6 Cache plugin",
|
|
||||||
"php-http/logger-plugin": "PSR-3 Logger plugin",
|
|
||||||
"php-http/stopwatch-plugin": "Symfony Stopwatch plugin"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.7-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Http\\Client\\Common\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Márk Sági-Kazár",
|
|
||||||
"email": "mark.sagikazar@gmail.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Common HTTP Client implementations and tools for HTTPlug",
|
|
||||||
"homepage": "http://httplug.io",
|
|
||||||
"keywords": [
|
|
||||||
"client",
|
|
||||||
"common",
|
|
||||||
"http",
|
|
||||||
"httplug"
|
|
||||||
],
|
|
||||||
"time": "2017-11-30T11:06:59+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "php-http/discovery",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/php-http/discovery.git",
|
|
||||||
"reference": "0ecc08360e6011a4454dc60077db6e9f412be94c"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/php-http/discovery/zipball/0ecc08360e6011a4454dc60077db6e9f412be94c",
|
|
||||||
"reference": "0ecc08360e6011a4454dc60077db6e9f412be94c",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": "^5.5 || ^7.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"henrikbjorn/phpspec-code-coverage": "^2.0.2",
|
|
||||||
"php-http/httplug": "^1.0",
|
|
||||||
"php-http/message-factory": "^1.0",
|
|
||||||
"phpspec/phpspec": "^2.4",
|
|
||||||
"puli/composer-plugin": "1.0.0-beta10"
|
|
||||||
},
|
|
||||||
"suggest": {
|
|
||||||
"php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories",
|
|
||||||
"puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details."
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.3-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Http\\Discovery\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Márk Sági-Kazár",
|
|
||||||
"email": "mark.sagikazar@gmail.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Finds installed HTTPlug implementations and PSR-7 message factories",
|
|
||||||
"homepage": "http://php-http.org",
|
|
||||||
"keywords": [
|
|
||||||
"adapter",
|
|
||||||
"client",
|
|
||||||
"discovery",
|
|
||||||
"factory",
|
|
||||||
"http",
|
|
||||||
"message",
|
|
||||||
"psr7"
|
|
||||||
],
|
|
||||||
"time": "2017-11-22T21:17:04+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "php-http/guzzle6-adapter",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/php-http/guzzle6-adapter.git",
|
|
||||||
"reference": "54181ff8455a4c2e1706a53e0d98060b93030321"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/54181ff8455a4c2e1706a53e0d98060b93030321",
|
|
||||||
"reference": "54181ff8455a4c2e1706a53e0d98060b93030321",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"guzzlehttp/guzzle": "^6.0",
|
|
||||||
"php": "^5.5 || ^7.0",
|
|
||||||
"php-http/httplug": "^1.0"
|
|
||||||
},
|
|
||||||
"provide": {
|
|
||||||
"php-http/async-client-implementation": "1.0",
|
|
||||||
"php-http/client-implementation": "1.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"ext-curl": "*",
|
|
||||||
"php-http/client-integration-tests": "^0.6"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.2-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Http\\Adapter\\Guzzle6\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Márk Sági-Kazár",
|
|
||||||
"email": "mark.sagikazar@gmail.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "David de Boer",
|
|
||||||
"email": "david@ddeboer.nl"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Guzzle 6 HTTP Adapter",
|
|
||||||
"homepage": "http://httplug.io",
|
|
||||||
"keywords": [
|
|
||||||
"Guzzle",
|
|
||||||
"http"
|
|
||||||
],
|
|
||||||
"time": "2017-05-29T15:06:15+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "php-http/httplug",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/php-http/httplug.git",
|
|
||||||
"reference": "afa7b216322f8157e21025f04f72eda0ee12f89d"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/php-http/httplug/zipball/afa7b216322f8157e21025f04f72eda0ee12f89d",
|
|
||||||
"reference": "afa7b216322f8157e21025f04f72eda0ee12f89d",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.4",
|
|
||||||
"php-http/promise": "^1.0",
|
|
||||||
"psr/http-message": "^1.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"henrikbjorn/phpspec-code-coverage": "^1.0",
|
|
||||||
"phpspec/phpspec": "^2.4"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.2-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Http\\Client\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Eric GELOEN",
|
|
||||||
"email": "geloen.eric@gmail.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Márk Sági-Kazár",
|
|
||||||
"email": "mark.sagikazar@gmail.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "HTTPlug, the HTTP client abstraction for PHP",
|
|
||||||
"homepage": "http://httplug.io",
|
|
||||||
"keywords": [
|
|
||||||
"client",
|
|
||||||
"http"
|
|
||||||
],
|
|
||||||
"time": "2017-12-18T08:01:36+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "php-http/message",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/php-http/message.git",
|
|
||||||
"reference": "977edb516e3c0419d3477610b4b718c8a9da1575"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/php-http/message/zipball/977edb516e3c0419d3477610b4b718c8a9da1575",
|
|
||||||
"reference": "977edb516e3c0419d3477610b4b718c8a9da1575",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"clue/stream-filter": "^1.4",
|
|
||||||
"php": ">=5.4",
|
|
||||||
"php-http/message-factory": "^1.0.2",
|
|
||||||
"psr/http-message": "^1.0"
|
|
||||||
},
|
|
||||||
"provide": {
|
|
||||||
"php-http/message-factory-implementation": "1.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"akeneo/phpspec-skip-example-extension": "^1.0",
|
|
||||||
"coduo/phpspec-data-provider-extension": "^1.0",
|
|
||||||
"ext-zlib": "*",
|
|
||||||
"guzzlehttp/psr7": "^1.0",
|
|
||||||
"henrikbjorn/phpspec-code-coverage": "^1.0",
|
|
||||||
"phpspec/phpspec": "^2.4",
|
|
||||||
"slim/slim": "^3.0",
|
|
||||||
"zendframework/zend-diactoros": "^1.0"
|
|
||||||
},
|
|
||||||
"suggest": {
|
|
||||||
"ext-zlib": "Used with compressor/decompressor streams",
|
|
||||||
"guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories",
|
|
||||||
"slim/slim": "Used with Slim Framework PSR-7 implementation",
|
|
||||||
"zendframework/zend-diactoros": "Used with Diactoros Factories"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.6-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Http\\Message\\": "src/"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"src/filters.php"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Márk Sági-Kazár",
|
|
||||||
"email": "mark.sagikazar@gmail.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "HTTP Message related tools",
|
|
||||||
"homepage": "http://php-http.org",
|
|
||||||
"keywords": [
|
|
||||||
"http",
|
|
||||||
"message",
|
|
||||||
"psr-7"
|
|
||||||
],
|
|
||||||
"time": "2017-11-25T06:38:46+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "php-http/message-factory",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/php-http/message-factory.git",
|
|
||||||
"reference": "a2809d4fe294ebe8879aec8d4d5bf21faa029344"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/php-http/message-factory/zipball/a2809d4fe294ebe8879aec8d4d5bf21faa029344",
|
|
||||||
"reference": "a2809d4fe294ebe8879aec8d4d5bf21faa029344",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.4",
|
|
||||||
"psr/http-message": "^1.0"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.0-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Http\\Message\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Márk Sági-Kazár",
|
|
||||||
"email": "mark.sagikazar@gmail.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Factory interfaces for PSR-7 HTTP Message",
|
|
||||||
"homepage": "http://php-http.org",
|
|
||||||
"keywords": [
|
|
||||||
"factory",
|
|
||||||
"http",
|
|
||||||
"message",
|
|
||||||
"stream",
|
|
||||||
"uri"
|
|
||||||
],
|
|
||||||
"time": "2016-02-03T08:16:31+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "php-http/promise",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/php-http/promise.git",
|
|
||||||
"reference": "1cc44dc01402d407fc6da922591deebe4659826f"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/php-http/promise/zipball/1cc44dc01402d407fc6da922591deebe4659826f",
|
|
||||||
"reference": "1cc44dc01402d407fc6da922591deebe4659826f",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"henrikbjorn/phpspec-code-coverage": "^1.0",
|
|
||||||
"phpspec/phpspec": "^2.4"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.0-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Http\\Promise\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Márk Sági-Kazár",
|
|
||||||
"email": "mark.sagikazar@gmail.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Joel Wurtz",
|
|
||||||
"email": "joel.wurtz@gmail.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Promise used for asynchronous HTTP requests",
|
|
||||||
"homepage": "http://httplug.io",
|
|
||||||
"keywords": [
|
|
||||||
"promise"
|
|
||||||
],
|
|
||||||
"time": "2017-11-22T21:24:54+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "psr/cache",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/php-fig/cache.git",
|
|
||||||
"reference": "78c5a01ddbf11cf731f1338a4f5aba23b14d5b47"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/php-fig/cache/zipball/78c5a01ddbf11cf731f1338a4f5aba23b14d5b47",
|
|
||||||
"reference": "78c5a01ddbf11cf731f1338a4f5aba23b14d5b47",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.3.0"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.0.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Psr\\Cache\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "PHP-FIG",
|
|
||||||
"homepage": "http://www.php-fig.org/"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Common interface for caching libraries",
|
|
||||||
"keywords": [
|
|
||||||
"cache",
|
|
||||||
"psr",
|
|
||||||
"psr-6"
|
|
||||||
],
|
|
||||||
"time": "2016-10-13T14:48:10+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "psr/http-message",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/php-fig/http-message.git",
|
|
||||||
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
|
|
||||||
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.3.0"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.0.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Psr\\Http\\Message\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "PHP-FIG",
|
|
||||||
"homepage": "http://www.php-fig.org/"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Common interface for HTTP messages",
|
|
||||||
"homepage": "https://github.com/php-fig/http-message",
|
|
||||||
"keywords": [
|
|
||||||
"http",
|
|
||||||
"http-message",
|
|
||||||
"psr",
|
|
||||||
"psr-7",
|
|
||||||
"request",
|
|
||||||
"response"
|
|
||||||
],
|
|
||||||
"time": "2016-08-06T14:39:51+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "symfony/options-resolver",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/symfony/options-resolver.git",
|
|
||||||
"reference": "95a16ad04c0ca3404c9286eca3b4a0c36cc46f7d"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/95a16ad04c0ca3404c9286eca3b4a0c36cc46f7d",
|
|
||||||
"reference": "95a16ad04c0ca3404c9286eca3b4a0c36cc46f7d",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": "^7.1.3"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "4.1-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Symfony\\Component\\OptionsResolver\\": ""
|
|
||||||
},
|
|
||||||
"exclude-from-classmap": [
|
|
||||||
"/Tests/"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Fabien Potencier",
|
|
||||||
"email": "fabien@symfony.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Symfony Community",
|
|
||||||
"homepage": "https://symfony.com/contributors"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Symfony OptionsResolver Component",
|
|
||||||
"homepage": "https://symfony.com",
|
|
||||||
"keywords": [
|
|
||||||
"config",
|
|
||||||
"configuration",
|
|
||||||
"options"
|
|
||||||
],
|
|
||||||
"time": "2017-12-14T19:50:39+00:00"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [],
|
"packages-dev": [],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"stability-flags": {
|
"stability-flags": [],
|
||||||
"knplabs/github-api": 20,
|
|
||||||
"php-http/guzzle6-adapter": 20
|
|
||||||
},
|
|
||||||
"prefer-stable": false,
|
"prefer-stable": false,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": [],
|
"platform": [],
|
||||||
|
|
|
@ -1,113 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
require __DIR__ . '/config.php';
|
|
||||||
|
|
||||||
use PhpAmqpLib\Message\AMQPMessage;
|
|
||||||
|
|
||||||
# define('AMQP_DEBUG', true);
|
|
||||||
$connection = rabbitmq_conn();
|
|
||||||
$channel = $connection->channel();
|
|
||||||
$channel->basic_qos(null, 1, true);
|
|
||||||
|
|
||||||
|
|
||||||
$channel->queue_declare('mass-rebuild-check-jobs',
|
|
||||||
false, true, false, false);
|
|
||||||
list($queueName, , ) = $channel->queue_declare('mass-rebuild-check-inputs',
|
|
||||||
false, true, false, false);
|
|
||||||
$channel->queue_bind($queueName, 'github-events', 'pull_request.nixos/nixpkgs');
|
|
||||||
|
|
||||||
echo "hi\n";
|
|
||||||
|
|
||||||
function outrunner($msg) {
|
|
||||||
try {
|
|
||||||
runner($msg);
|
|
||||||
} catch (\PhpAmqpLib\Exception\AMQPProtocolChannelException $e) {
|
|
||||||
echo "Channel exception:\n";
|
|
||||||
var_dump($e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function runner($msg) {
|
|
||||||
echo "Msg Sha: " . md5($msg->body) . "\n";
|
|
||||||
$in = json_decode($msg->body);
|
|
||||||
|
|
||||||
if (!\GHE\ACL::isRepoEligible($in->repository->full_name)) {
|
|
||||||
echo "Repo not authorized (" . $in->repository->full_name . ")\n";
|
|
||||||
$msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($in->pull_request->state != "open") {
|
|
||||||
echo "PR isn't open in the event\n";
|
|
||||||
$msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$client = gh_client();
|
|
||||||
$status = $client->api('pull_request')->show(
|
|
||||||
$in->repository->owner->login,
|
|
||||||
$in->repository->name,
|
|
||||||
$in->number);
|
|
||||||
if ($status['mergeable'] === false) {
|
|
||||||
echo "github says the PR isn't able to be merged\n";
|
|
||||||
$msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if ($status['state'] !== 'open') {
|
|
||||||
echo "github says the PR isn't open\n";
|
|
||||||
$msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$ok_events = [
|
|
||||||
'opened',
|
|
||||||
'created',
|
|
||||||
'synchronize',
|
|
||||||
'reopened',
|
|
||||||
];
|
|
||||||
|
|
||||||
if (!in_array($in->action, $ok_events)) {
|
|
||||||
echo "Uninteresting event " . $in->action . "\n";
|
|
||||||
$msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']);
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
echo "so-called interesting event on #" . $in->number . ": " . $in->action . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
$forward = [
|
|
||||||
'original_payload' => $in,
|
|
||||||
'repo' => [
|
|
||||||
'owner' => $in->repository->owner->login,
|
|
||||||
'name' => $in->repository->name,
|
|
||||||
'full_name' => $in->repository->full_name,
|
|
||||||
'clone_url' => $in->repository->clone_url,
|
|
||||||
],
|
|
||||||
'pr' => [
|
|
||||||
'number' => $in->number,
|
|
||||||
'target_branch' => $in->pull_request->base->ref,
|
|
||||||
'patch_url' => $in->pull_request->patch_url,
|
|
||||||
'head_sha' => $in->pull_request->head->sha,
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
echo "forwarding to mass-rebuild-check-jobs :)\n";
|
|
||||||
|
|
||||||
$message = new AMQPMessage(json_encode($forward),
|
|
||||||
array(
|
|
||||||
'content_type' => 'application/json',
|
|
||||||
'delivery_mode' => AMQPMessage::DELIVERY_MODE_PERSISTENT,
|
|
||||||
));
|
|
||||||
$msg->delivery_info['channel']->basic_publish($message, '', 'mass-rebuild-check-jobs');
|
|
||||||
$msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$consumerTag = 'massrebuildcheckfilter' . getmypid();
|
|
||||||
$channel->basic_consume($queueName, $consumerTag, false, false, false, false, 'outrunner');
|
|
||||||
while(count($channel->callbacks)) {
|
|
||||||
$channel->wait();
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "Bye\n";
|
|
Loading…
Reference in a new issue