diff --git a/entry.cjs b/entry.cjs index 293c607..bbc380a 100755 --- a/entry.cjs +++ b/entry.cjs @@ -26005,13 +26005,13 @@ async function setupGitHubInstallationToken() { async function run() { try { const prompt = core4.getInput("prompt", { required: true }); - const anthropicApiKey = core4.getInput("anthropic_api_key"); + const anthropic_api_key = core4.getInput("anthropic_api_key"); if (!prompt) { throw new Error("prompt is required"); } const inputs = { prompt, - anthropic_api_key: anthropicApiKey + anthropic_api_key }; const githubToken = core4.getInput("github_token") || process.env.GITHUB_TOKEN; if (githubToken) { diff --git a/entry.ts b/entry.ts index 0fffe73..9e62921 100644 --- a/entry.ts +++ b/entry.ts @@ -6,23 +6,23 @@ */ import * as core from "@actions/core"; -import { type MainParams, main } from "./main.ts"; +import { type ExecutionInputs, type MainParams, main } from "./main.ts"; import { setupGitHubInstallationToken } from "./utils/github.ts"; async function run(): Promise { try { // Get inputs from GitHub Actions const prompt = core.getInput("prompt", { required: true }); - const anthropicApiKey = core.getInput("anthropic_api_key"); + const anthropic_api_key = core.getInput("anthropic_api_key"); if (!prompt) { throw new Error("prompt is required"); } // Create params object with new structure - const inputs: any = { + const inputs: ExecutionInputs = { prompt, - anthropic_api_key: anthropicApiKey, + anthropic_api_key, }; // Add optional properties only if they exist @@ -36,7 +36,6 @@ async function run(): Promise { if (githubInstallationToken) { inputs.github_installation_token = githubInstallationToken; } else { - // Setup GitHub installation token await setupGitHubInstallationToken(); } @@ -46,7 +45,6 @@ async function run(): Promise { cwd: process.cwd(), }; - // Run the main function const result = await main(params); // TODO: Set outputs