From f7363549ac613351d1e2378d8cd623c1eb1ec884 Mon Sep 17 00:00:00 2001 From: Federico Builes Date: Mon, 9 Oct 2023 13:20:24 +0200 Subject: [PATCH] use octokit plugins --- src/dependency-graph.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/dependency-graph.ts b/src/dependency-graph.ts index a3c03d1eb..084211f3b 100644 --- a/src/dependency-graph.ts +++ b/src/dependency-graph.ts @@ -1,13 +1,16 @@ import * as core from '@actions/core' import * as githubUtils from '@actions/github/lib/utils' -import * as retry from '@octokit/plugin-retry' +import {Octokit} from '@octokit/core' +import {retry} from '@octokit/plugin-retry' +import {paginateRest} from '@octokit/plugin-paginate-rest' + import { ChangesSchema, ComparisonResponse, ComparisonResponseSchema } from './schemas' -const retryingOctokit = githubUtils.GitHub.plugin(retry.retry) +const retryingOctokit = Octokit.plugin(retry, paginateRest) const SnapshotWarningsHeader = 'x-github-dependency-graph-snapshot-warnings' const octo = new retryingOctokit( githubUtils.getOctokitOptions(core.getInput('repo-token', {required: true}))