mirror of
https://github.com/github/codeql-action.git
synced 2026-05-08 06:40:19 +00:00
Configure the API client to retry more often when in test mode
This commit is contained in:
Generated
+5
-1
@@ -88523,6 +88523,9 @@ function parseRepositoryNwo(input) {
|
||||
|
||||
// src/api-client.ts
|
||||
var GITHUB_ENTERPRISE_VERSION_HEADER = "x-github-enterprise-version";
|
||||
function getRetryConfig() {
|
||||
return isInTestMode() ? { retries: 10 } : { retries: 3 };
|
||||
}
|
||||
function createApiClientWithDetails(apiDetails, { allowExternal = false } = {}) {
|
||||
const auth = allowExternal && apiDetails.externalRepoAuth || apiDetails.auth;
|
||||
const retryingOctokit = githubUtils.GitHub.plugin(retry.retry);
|
||||
@@ -88530,7 +88533,8 @@ function createApiClientWithDetails(apiDetails, { allowExternal = false } = {})
|
||||
githubUtils.getOctokitOptions(auth, {
|
||||
baseUrl: apiDetails.apiURL,
|
||||
userAgent: `CodeQL-Action/${getActionVersion()}`,
|
||||
log: (0, import_console_log_level.default)({ level: "debug" })
|
||||
log: (0, import_console_log_level.default)({ level: "debug" }),
|
||||
retry: getRetryConfig()
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user