From 0c9c29b59485f4aa2de36276e3da6ec2bb216b4d Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Thu, 29 Sep 2022 15:33:03 -0500 Subject: [PATCH] Add pagination to Nextflow release list --- index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/index.ts b/index.ts index 8a7e2bd..9999034 100644 --- a/index.ts +++ b/index.ts @@ -9,9 +9,11 @@ import semver = require("semver"); const NEXTFLOW_REPO = { owner: "nextflow-io", repo: "nextflow" }; async function all_nf_releases(ok) { - const { data: releases } = await ok.rest.repos.listReleases(NEXTFLOW_REPO); - - return releases; + return await ok.paginate( + ok.rest.repos.listReleases, + NEXTFLOW_REPO, + (response) => response.data + ); } async function latest_stable_release_data(ok) {