From 032db0b5d4956a514bd5c5b70d37509a518bc99a Mon Sep 17 00:00:00 2001 From: Daniel Rozenberg Date: Fri, 16 Jun 2023 14:29:58 -0400 Subject: [PATCH] Workaround for typing issues in cut-nightly.js --- build-system/release-workflows/cut-nightly.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/build-system/release-workflows/cut-nightly.js b/build-system/release-workflows/cut-nightly.js index ab83d421ce31..f00694af28b8 100644 --- a/build-system/release-workflows/cut-nightly.js +++ b/build-system/release-workflows/cut-nightly.js @@ -57,11 +57,16 @@ async function getCommit(octokit) { for (const {sha} of commits.data) { const checkRuns = ( - await octokit.paginate(octokit.rest.checks.listForRef, { - ...params, - ref: sha, - 'per_page': 100, - }) + await octokit.paginate( + // TODO(danielrozenberg): seems to be related to https://github.com/octokit/plugin-paginate-rest.js/issues/350 + // restore this when the types match again: await octokit.rest.checks.listForRef, + 'GET /repos/{owner}/{repo}/commits/{ref}/check-runs', + { + ...params, + ref: sha, + 'per_page': 100, + } + ) ).filter( ({'external_id': id, name}) => id !== GITHUB_EXTERNAL_ID && !CHECKS_TO_SKIP.includes(name)