fix input type
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user