Skip to content

Commit

Permalink
use octokit plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
febuiles committed Oct 9, 2023
1 parent f71a906 commit f736354
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/dependency-graph.ts
Original file line number Diff line number Diff line change
@@ -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}))
Expand Down

0 comments on commit f736354

Please sign in to comment.