Auto-retry ratelimited octokit requests

This commit is contained in:
Mateusz Burzyński
2026-01-07 17:10:13 +01:00
parent 0504fc42ff
commit a483711fee
9 changed files with 3759 additions and 2172 deletions
+2 -1
View File
@@ -19,6 +19,7 @@ import { fetchRepoSettings, fetchWorkflowRunInfo, type RepoSettings } from "./ut
import { log } from "./utils/cli.ts";
import { reportErrorToComment } from "./utils/errorReport.ts";
import {
createOctokit,
parseRepoContext,
revokeGitHubInstallationToken,
setupGitHubInstallationToken,
@@ -354,7 +355,7 @@ async function initializeGitHub(): Promise<GitHubSetup> {
const token = await setupGitHubInstallationToken();
const { owner, name } = parseRepoContext();
const octokit = new Octokit({ auth: token });
const octokit = createOctokit(token);
// fetch repo data and settings in parallel
const [repoResponse, repoSettings] = await Promise.all([