From 939b1f634341ac6919264e862c15cace91316253 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Mar 2026 12:27:44 +0000 Subject: [PATCH 1/2] Initial plan From 2041490dad98aafb16c675459d13861652c00e2f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Mar 2026 12:34:54 +0000 Subject: [PATCH 2/2] fix: add explicit type annotations to throttle callbacks to fix TS errors with @octokit/plugin-retry v8.1.0 Co-authored-by: Kesin11 <1324862+Kesin11@users.noreply.github.com> --- src/client/github_client.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client/github_client.ts b/src/client/github_client.ts index 837cf4c0..4698d339 100644 --- a/src/client/github_client.ts +++ b/src/client/github_client.ts @@ -11,6 +11,8 @@ import type { ArgumentOptions } from "../arg_options.js"; const DEBUG_PER_PAGE = 10; +type ThrottleRequestOptions = { method: string; url: string }; + export type WorkflowItem = RestEndpointMethodTypes["actions"]["listRepoWorkflows"]["response"]["data"]["workflows"][0]; type WorkflowRunsItem = @@ -33,7 +35,7 @@ export class GithubClient { baseUrl: baseUrl ? baseUrl : "https://api.github.com", log: options.debug ? console : undefined, throttle: { - onRateLimit: (retryAfter, options, _octokit, retryCount) => { + onRateLimit: (retryAfter: number, options: ThrottleRequestOptions, _octokit: unknown, retryCount: number) => { this.#octokit.log.warn( `Request quota exhausted for request ${options.method} ${options.url}`, ); @@ -43,7 +45,7 @@ export class GithubClient { return true; } }, - onSecondaryRateLimit: (_retryAfter, options, _octokit, _retryCount) => { + onSecondaryRateLimit: (_retryAfter: number, options: ThrottleRequestOptions, _octokit: unknown, _retryCount: number) => { // does not retry, only logs a warning this.#octokit.log.warn( `Abuse detected for request ${options.method} ${options.url}`,