Skip to content

Commit

Permalink
Add back retrying.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Gavin committed Jun 4, 2021
1 parent cbdf0df commit 41dff7f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/api-client.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/api-client.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/api-client.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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}`,
Expand Down

0 comments on commit 41dff7f

Please sign in to comment.