Commit ac19ced9 authored by Stephan Großberndt's avatar Stephan Großberndt
Browse files

[TASK] Remove patchset-created hook for intercept.typo3.com

parent a7de7ebd
#!/usr/bin/php
<?php
require_once dirname(__FILE__) . '/../arguments.php';
$args = getArguments();
// do not disclose changes in foreign repositories!
if ($args['project'] !== 'Packages/TYPO3.CMS' && $args['project'] !== 'Teams/Security/TYPO3v4-Core') {
echo 'Will not send anything for repositories except Packages/TYPO3.CMS and Teams/Security/TYPO3v4-Core';
exit;
}
$args['token'] = getenv('HOOK_TOKEN_intercepttypo3com');
$args['changeUrl'] = $args['change-url'];
$url = 'https://intercept.typo3.com/gerrit';
// url-ify the data for the POST
$fields = '';
foreach ($args as $key => $value) {
$fields .= $key . '=' . urlencode($value) . '&';
}
rtrim($fields, '&');
// open connection
$ch = curl_init();
// set the url, number of POST vars, POST data
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
// execute post
$result = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
// close connection
curl_close($ch);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment