fix input type

This commit is contained in:
David Blass
2025-09-24 13:52:18 -04:00
parent e13c5eed00
commit ff1226a824
2 changed files with 6 additions and 8 deletions
+4 -6
View File
@@ -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<void> {
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<void> {
if (githubInstallationToken) {
inputs.github_installation_token = githubInstallationToken;
} else {
// Setup GitHub installation token
await setupGitHubInstallationToken();
}
@@ -46,7 +45,6 @@ async function run(): Promise<void> {
cwd: process.cwd(),
};
// Run the main function
const result = await main(params);
// TODO: Set outputs