Add repo settings API integration and move workflows into action

- Add getRepoSettings utility to fetch repo settings from Pullfrog API
- Integrate repo settings fetch in main.ts with agent validation
- Move workflows from lib/workflows.ts into action/workflows.ts
- Update workflow prompts to include comment management steps
- Add 'Prompt' workflow as fallback for general tasks
- Fix null check for response.body in claude agent tarball download
- Remove unused message handlers (tool_progress, auth_status)
- Fix tsconfig.json indentation consistency
This commit is contained in:
Colin McDonnell
2025-11-11 11:34:37 -08:00
parent 894c525f21
commit 40dc13b55f
7 changed files with 232 additions and 80 deletions
+6
View File
@@ -2,6 +2,7 @@ import { type } from "arktype";
import { claude } from "./agents/claude.ts";
import { createMcpConfigs } from "./mcp/config.ts";
import packageJson from "./package.json" with { type: "json" };
import { getRepoSettings } from "./utils/api.ts";
import { log } from "./utils/cli.ts";
import { parseRepoContext, setupGitHubInstallationToken } from "./utils/github.ts";
import { setupGitAuth, setupGitConfig } from "./utils/setup.ts";
@@ -30,6 +31,11 @@ export async function main(inputs: Inputs): Promise<MainResult> {
const githubInstallationToken = await setupGitHubInstallationToken();
const repoContext = parseRepoContext();
// Fetch repo settings (agent, permissions, workflows) from API
const repoSettings = await getRepoSettings(githubInstallationToken, repoContext);
if (repoSettings.defaultAgent !== "claude")
throw new Error(`Unsupported agent: ${repoSettings.defaultAgent}`);
setupGitAuth(githubInstallationToken, repoContext);
const mcpServers = createMcpConfigs(githubInstallationToken);