From a7dc0e4fc1f13a563d93a9fdb7f827f9e8fd69ce Mon Sep 17 00:00:00 2001 From: Salman Chishti Date: Sun, 1 Mar 2026 01:30:49 +0000 Subject: [PATCH] fix: use typeof getOctokit instead of deep @octokit/core import, rebuild dist/ --- src/async-function.ts | 8 ++------ types/async-function.d.ts | 2 ++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/async-function.ts b/src/async-function.ts index 56fb239..7f928b4 100644 --- a/src/async-function.ts +++ b/src/async-function.ts @@ -1,10 +1,10 @@ import * as core from '@actions/core' import * as exec from '@actions/exec' +import {getOctokit} from '@actions/github' import {Context} from '@actions/github/lib/context' import {GitHub} from '@actions/github/lib/utils' import * as glob from '@actions/glob' import * as io from '@actions/io' -import type {OctokitOptions, OctokitPlugin} from '@octokit/core/types' const AsyncFunction = Object.getPrototypeOf(async () => null).constructor @@ -13,11 +13,7 @@ export declare type AsyncFunctionArguments = { core: typeof core github: InstanceType octokit: InstanceType - getOctokit: ( - token: string, - options?: OctokitOptions, - ...additionalPlugins: OctokitPlugin[] - ) => InstanceType + getOctokit: typeof getOctokit exec: typeof exec glob: typeof glob io: typeof io diff --git a/types/async-function.d.ts b/types/async-function.d.ts index b204e36..3c2de8e 100644 --- a/types/async-function.d.ts +++ b/types/async-function.d.ts @@ -1,6 +1,7 @@ /// import * as core from '@actions/core'; import * as exec from '@actions/exec'; +import { getOctokit } from '@actions/github'; import { Context } from '@actions/github/lib/context'; import { GitHub } from '@actions/github/lib/utils'; import * as glob from '@actions/glob'; @@ -10,6 +11,7 @@ export declare type AsyncFunctionArguments = { core: typeof core; github: InstanceType; octokit: InstanceType; + getOctokit: typeof getOctokit; exec: typeof exec; glob: typeof glob; io: typeof io;