This commit is contained in:
David Blass
2025-10-13 14:04:46 -04:00
parent 2296060d04
commit 9444a0e208
4 changed files with 975 additions and 748 deletions
+965 -736
View File
File diff suppressed because one or more lines are too long
+2 -1
View File
@@ -7,10 +7,12 @@
import * as core from "@actions/core"; import * as core from "@actions/core";
import { type ExecutionInputs, type MainParams, main } from "./main.ts"; import { type ExecutionInputs, type MainParams, main } from "./main.ts";
import packageJson from "./package.json" with { type: "json" };
import { setupGitHubInstallationToken } from "./utils/github.ts"; import { setupGitHubInstallationToken } from "./utils/github.ts";
async function run(): Promise<void> { async function run(): Promise<void> {
try { try {
console.log(`🐸 Running pullfrog/action@${packageJson.version}...`);
const prompt = core.getInput("prompt", { required: true }); const prompt = core.getInput("prompt", { required: true });
const anthropic_api_key = core.getInput("anthropic_api_key"); const anthropic_api_key = core.getInput("anthropic_api_key");
@@ -44,7 +46,6 @@ async function run(): Promise<void> {
const result = await main(params); const result = await main(params);
if (!result.success) { if (!result.success) {
throw new Error(result.error || "Agent execution failed"); throw new Error(result.error || "Agent execution failed");
} }
+3 -7
View File
@@ -1,14 +1,11 @@
/** /**
* Simple MCP configuration helper for adding our minimal GitHub comment server * Simple MCP configuration helper for adding our minimal GitHub comment server
*/ */
const actionPath = process.env.GITHUB_ACTION_PATH || process.cwd(); // const actionPath = process.env.GITHUB_ACTION_PATH || process.cwd();
// import { dirname } from "node:path"; import { fromHere } from "@ark/fs";
// import { fileURLToPath } from "node:url";
// const __filename = fileURLToPath(import.meta.url); const actionPath = fromHere("..");
// const __dirname = dirname(__filename);
// const actionPath = dirname(__dirname);
export function createMcpConfig(githubInstallationToken: string) { export function createMcpConfig(githubInstallationToken: string) {
const githubRepository = process.env.GITHUB_REPOSITORY; const githubRepository = process.env.GITHUB_REPOSITORY;
@@ -27,7 +24,6 @@ export function createMcpConfig(githubInstallationToken: string) {
env: { env: {
GITHUB_INSTALLATION_TOKEN: githubInstallationToken, GITHUB_INSTALLATION_TOKEN: githubInstallationToken,
GITHUB_REPOSITORY: githubRepository, GITHUB_REPOSITORY: githubRepository,
LOG_LEVEL: "debug",
}, },
}, },
}, },
+5 -4
View File
@@ -1,6 +1,6 @@
{ {
"name": "@pullfrog/action", "name": "@pullfrog/action",
"version": "0.0.25", "version": "0.0.26",
"type": "module", "type": "module",
"files": [ "files": [
"index.js", "index.js",
@@ -27,6 +27,7 @@
"createLockfile": "pnpm --ignore-workspace install" "createLockfile": "pnpm --ignore-workspace install"
}, },
"dependencies": { "dependencies": {
"@ark/fs": "0.49.0",
"@actions/core": "^1.11.1", "@actions/core": "^1.11.1",
"@modelcontextprotocol/sdk": "^1.17.5", "@modelcontextprotocol/sdk": "^1.17.5",
"@octokit/rest": "^22.0.0", "@octokit/rest": "^22.0.0",
@@ -34,7 +35,8 @@
"arktype": "^2.1.22", "arktype": "^2.1.22",
"dotenv": "^17.2.2", "dotenv": "^17.2.2",
"execa": "^9.6.0", "execa": "^9.6.0",
"table": "^6.9.0" "table": "^6.9.0",
"zod": "^3.24.4"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.10.0", "@types/node": "^20.10.0",
@@ -42,8 +44,7 @@
"esbuild": "^0.25.9", "esbuild": "^0.25.9",
"husky": "^9.0.0", "husky": "^9.0.0",
"typescript": "^5.3.0", "typescript": "^5.3.0",
"zshy": "^0.4.1", "zshy": "^0.4.1"
"zod": "^3.24.4"
}, },
"repository": { "repository": {
"type": "git", "type": "git",