Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d6bc0fdd64 | |||
| 8fd0328109 |
@@ -195,6 +195,15 @@ function processJSONChunk(chunk: string, agent?: ClaudeAgent): void {
|
||||
],
|
||||
])
|
||||
);
|
||||
|
||||
// Check if MCP servers are expected but failed
|
||||
if (parsedChunk.mcp_servers?.length > 0) {
|
||||
const failedServers = parsedChunk.mcp_servers.filter((server: any) => server.status === "failed");
|
||||
if (failedServers.length > 0) {
|
||||
const failedNames = failedServers.map((server: any) => server.name).join(", ");
|
||||
throw new Error(`MCP servers failed to start: ${failedNames}. This indicates a configuration or environment issue that prevents GitHub integration from working.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -25506,6 +25506,10 @@ var core = __toESM(require_core(), 1);
|
||||
// mcp/config.ts
|
||||
var actionPath = process.env.GITHUB_ACTION_PATH || process.cwd();
|
||||
function createMcpConfig(githubInstallationToken) {
|
||||
const githubRepository = process.env.GITHUB_REPOSITORY;
|
||||
if (!githubRepository) {
|
||||
throw new Error("GITHUB_REPOSITORY environment variable is required for MCP GitHub integration");
|
||||
}
|
||||
return JSON.stringify(
|
||||
{
|
||||
mcpServers: {
|
||||
@@ -25513,7 +25517,8 @@ function createMcpConfig(githubInstallationToken) {
|
||||
command: "node",
|
||||
args: [`${actionPath}/mcp/server.ts`],
|
||||
env: {
|
||||
GITHUB_INSTALLATION_TOKEN: githubInstallationToken
|
||||
GITHUB_INSTALLATION_TOKEN: githubInstallationToken,
|
||||
GITHUB_REPOSITORY: githubRepository
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25853,6 +25858,13 @@ function processJSONChunk(chunk, agent) {
|
||||
]
|
||||
])
|
||||
);
|
||||
if (parsedChunk.mcp_servers?.length > 0) {
|
||||
const failedServers = parsedChunk.mcp_servers.filter((server) => server.status === "failed");
|
||||
if (failedServers.length > 0) {
|
||||
const failedNames = failedServers.map((server) => server.name).join(", ");
|
||||
throw new Error(`MCP servers failed to start: ${failedNames}. This indicates a configuration or environment issue that prevents GitHub integration from working.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "assistant":
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
const actionPath = process.env.GITHUB_ACTION_PATH || process.cwd();
|
||||
|
||||
export function createMcpConfig(githubInstallationToken: string) {
|
||||
const githubRepository = process.env.GITHUB_REPOSITORY;
|
||||
if (!githubRepository) {
|
||||
throw new Error('GITHUB_REPOSITORY environment variable is required for MCP GitHub integration');
|
||||
}
|
||||
|
||||
return JSON.stringify(
|
||||
{
|
||||
mcpServers: {
|
||||
@@ -12,6 +17,7 @@ export function createMcpConfig(githubInstallationToken: string) {
|
||||
args: [`${actionPath}/mcp/server.ts`],
|
||||
env: {
|
||||
GITHUB_INSTALLATION_TOKEN: githubInstallationToken,
|
||||
GITHUB_REPOSITORY: githubRepository,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pullfrog/action",
|
||||
"version": "0.0.15",
|
||||
"version": "0.0.17",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"index.js",
|
||||
|
||||
Reference in New Issue
Block a user