From: Dan Brown Date: Mon, 3 Feb 2020 22:14:21 +0000 (+0000) Subject: Updated change-log script to handle multiple pages of issues X-Git-Url: http://source.bookstackapp.com/devops/commitdiff_plain/da9b42a40015c8b8c4fea728d3e7e2e94341a423 Updated change-log script to handle multiple pages of issues --- diff --git a/meta-scripts/bookstack-changelog b/meta-scripts/bookstack-changelog index 4976ad7..f594234 100755 --- a/meta-scripts/bookstack-changelog +++ b/meta-scripts/bookstack-changelog @@ -35,8 +35,16 @@ if (count($argv) < 2) { // Get milestone info from GitHub $milestoneID = intval($argv[1]); + +$issues = []; +$requestIssues = []; +$page = 1; $issueURL = 'https://api.github.com/repos/BookStackApp/BookStack/issues?milestone='. $milestoneID .'&state=all'; -$issues = getJSON($issueURL); +do { + $requestIssues = getJSON($issueURL . '&page=' . $page); + $issues = array_merge($issues, $requestIssues); + $page++; +} while (count($requestIssues) > 0); // Get BookStack version and check if a feature or minor release $milestone = $issues[0]['milestone'];