]> BookStack Code Mirror - devops/commitdiff
Updated change-log script to handle multiple pages of issues
authorDan Brown <redacted>
Mon, 3 Feb 2020 22:14:21 +0000 (22:14 +0000)
committerDan Brown <redacted>
Mon, 3 Feb 2020 22:14:21 +0000 (22:14 +0000)
meta-scripts/bookstack-changelog

index 4976ad7fd8b50c4eafac6776c31715380d99e8b2..f59423436d99d7d08c05b3088582790c90853b2a 100755 (executable)
@@ -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'];