Add back retrying.

This commit is contained in:
Chris Gavin 2021-06-04 15:48:22 +01:00
parent cbdf0df97b
commit 41dff7fce3
No known key found for this signature in database
GPG key ID: 07F950B80C27E4DA
3 changed files with 7 additions and 3 deletions

View file

@ -1,6 +1,7 @@
import * as path from "path";
import * as githubUtils from "@actions/github/lib/utils";
import * as retry from "@octokit/plugin-retry";
import consoleLogLevel from "console-log-level";
import { getRequiredInput } from "./actions-util";
@ -33,7 +34,8 @@ export const getApiClient = function (
) {
const auth =
(allowExternal && apiDetails.externalRepoAuth) || apiDetails.auth;
return new githubUtils.GitHub(
const retryingOctokit = githubUtils.GitHub.plugin(retry.retry);
return new retryingOctokit(
githubUtils.getOctokitOptions(auth, {
baseUrl: getApiUrl(apiDetails.url),
userAgent: `CodeQL-${getMode()}/${pkg.version}`,