1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-14 12:52:08 +02:00

[ticket/16557] Support piping tracker XML to build_changelog.php

PHPBB3-16557
This commit is contained in:
Marc Alexander 2020-07-27 20:35:12 +02:00
parent 65065bf315
commit 1a029a71e5
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -18,15 +18,25 @@ if ($_SERVER['argc'] != 2)
exit(1);
}
$fixVersion = $_SERVER['argv'][1];
if ($_SERVER['argv'][1] == '--stdin')
{
$stdIn = file_get_contents('php://stdin');
// XML output from tracker can be directly piped to this script using:
// cat tracker_output.xml | php build/build_changelog.php --stdin
$xml = simplexml_load_string($stdIn);
}
else
{
$fixVersion = $_SERVER['argv'][1];
$query = 'project IN (PHPBB3, SECURITY)
AND resolution = Fixed
AND fixVersion = "' . $fixVersion . '"
AND status IN ("Unverified Fix", Closed)';
$query = 'project IN (PHPBB3, SECURITY)
AND resolution = Fixed
AND fixVersion = "' . $fixVersion . '"
AND status IN ("Unverified Fix", Closed)';
$url = 'http://tracker.phpbb.com/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=' . urlencode($query) . '&tempMax=1000';
$xml = simplexml_load_string(file_get_contents($url));
$url = 'https://tracker.phpbb.com/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=' . urlencode($query) . '&tempMax=1000';
$xml = simplexml_load_string(file_get_contents($url));
}
foreach ($xml->xpath('//item') as $item)
{