X-Git-Url: http://source.bookstackapp.com/devops/blobdiff_plain/88af59f1bae9d0d101720aac99bd812e728dbd6f..HEAD:/meta-scripts/bookstack-changelog diff --git a/meta-scripts/bookstack-changelog b/meta-scripts/bookstack-changelog index 4976ad7..26576ec 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']; @@ -44,21 +52,22 @@ $versionMatch = []; preg_match('/v[0-9.]{5,7}/', $milestone['title'], $versionMatch); $version = $versionMatch[0]; $splitVersion = explode('.', $version); -$isFeature = intval(array_pop($splitVersion)) === 0; +$isFeature = count($splitVersion) === 2; // Output title -output("# BookStack Beta {$version}\n"); +output("# BookStack {$version}\n"); // Output header text and links +output("### Links\n"); +output("- [Update instructions](https://www.bookstackapp.com/docs/admin/updates)"); if ($isFeature) { - $urlVersion = implode('0', $splitVersion); - output("- [Update instructions](https://www.bookstackapp.com/docs/admin/updates)"); - output("- [Update details on blog](https://www.bookstackapp.com/blog/beta-release-{$urlVersion}/)"); - output("\n### Full List of Changes\n"); -} else { - output("\nThis release contains the following fixes and changes:\n"); + $urlVersion = implode('-', $splitVersion); + output("- [Update details on blog](https://www.bookstackapp.com/blog/bookstack-release-{$urlVersion}/)"); } +output("\n### Full List of Changes\n"); +output("This release contains the following fixes and changes:\n"); + // Output issues foreach ($issues as $issue) { $output = '* ';