From 2a8fe826bd7ced261307f00a1159f219553855cb Mon Sep 17 00:00:00 2001 From: Terry Sutton Date: Tue, 13 Feb 2024 13:12:12 -0330 Subject: [PATCH] Only allow old releases to show on the changelog page (#21084) --- apps/www/pages/changelog.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/www/pages/changelog.tsx b/apps/www/pages/changelog.tsx index b8b3b005be0..e41dec83e85 100644 --- a/apps/www/pages/changelog.tsx +++ b/apps/www/pages/changelog.tsx @@ -82,7 +82,19 @@ export const getServerSideProps: GetServerSideProps = async ({ res, query }) => } } - const releases = await fetchGitHubReleases() + // Process as of Feb. 2024: + // create a Release each month and create a corresponding changelog discussion + // — we don't want to pull in both the changelog entry and the release entry + // — we want to ignore new releases and only show the old ones that don't have a corresponding changelog discussion + // — so we have this list of old releases that we want to show + const oldReleases = [ + 40981345, 39091930, 37212777, 35927141, 34612423, 33383788, 32302703, 30830915, 29357247, + 28108378, + ] + + const releases = await ( + await fetchGitHubReleases() + ).filter((release) => release.id && oldReleases.includes(release.id)) // uses the graphql api async function fetchDiscussions(owner: string, repo: string, categoryId: string, cursor: string) {