diff --git a/.eslintrc.json b/.eslintrc.json index 78480f60..1630a80b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -6,8 +6,7 @@ "plugin:prettier/recommended", "plugin:import/errors", "plugin:import/warnings", - "plugin:import/typescript", - "plugin:import/node" + "plugin:import/typescript" ], "parser": "@typescript-eslint/parser", "parserOptions": { diff --git a/dist/index.js b/dist/index.js index 84cf1df2..5855c0c9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3399,7 +3399,7 @@ const retry = async (fn, args, times) => { if (i === times - 1) { throw error; } - core.warning(`Function failed on try ${i + 1}, retrying...`); + (0,core.warning)(`Function failed on try ${i + 1}, retrying...`); continue; } } diff --git a/src/bot.ts b/src/bot.ts index be898365..532ba101 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -6,6 +6,7 @@ import { ChatGPTError, ChatMessage, SendMessageOptions + // eslint-disable-next-line import/no-unresolved } from 'chatgpt' import {OpenAIOptions, Options} from './options' import {retry} from './utils' diff --git a/src/utils.ts b/src/utils.ts index 7f525732..ad8e330f 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,4 +1,4 @@ -import * as core from '@actions/core' +import {warning} from '@actions/core' export const retry = async ( fn: Function, @@ -12,7 +12,7 @@ export const retry = async ( if (i === times - 1) { throw error } - core.warning(`Function failed on try ${i + 1}, retrying...`) + warning(`Function failed on try ${i + 1}, retrying...`) continue } }