Skip to content

Commit 70f6d58

Browse files
committed
working again, shifted to pnpm
1 parent e9accbd commit 70f6d58

File tree

10 files changed

+1877
-6518
lines changed

10 files changed

+1877
-6518
lines changed

package-lock.json

Lines changed: 0 additions & 4707 deletions
This file was deleted.

pnpm-lock.yaml

Lines changed: 1867 additions & 1580 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/amp.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ export async function execute(options: ExecuteCommandOptions = {}): Promise<stri
7070
const includePromptFile = promptFilePath ? `cat ${promptFilePath} | ` : '';
7171
const includeThread = threadId ? ` threads continue ${threadId}` : '';
7272
const includeDebug = debug ? ` --log-level debug ` : '';
73-
// Use either settings file OR mcp config, not both (prefer mcp config)
74-
const includeSettings = !mcpServers && settingsFilePath ? ` --settings-file ${settingsFilePath} ` : '';
75-
const includeMcpConfig = mcpServers ? ` --mcp-config '${mcpConfigJson}' ` : '';
73+
// Use settings file when provided (contains dynamic values like installation ID)
74+
const includeSettings = settingsFilePath ? ` --settings-file ${settingsFilePath} ` : '';
75+
const includeMcpConfig = !settingsFilePath && mcpServers ? ` --mcp-config '${mcpConfigJson}' ` : '';
7676
const includeResult = resultFilePath ? ` > ${resultFilePath}` : '';
7777

7878
// Build the command string

src/github/installation-store.ts

Lines changed: 0 additions & 120 deletions
This file was deleted.

src/github/oauth.ts

Lines changed: 0 additions & 71 deletions
This file was deleted.

src/mcp/tools/leave_inline_comment.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ export async function leaveInlineComment(
1919
const { message, owner, repo, pr_number, path, line, commit_sha } = args;
2020

2121
// Get installation ID from environment
22-
const installationId = parseInt(process.env.GITHUB_INSTALLATION_ID || '0');
22+
const installationIdStr = process.env.GITHUB_INSTALLATION_ID || '0';
23+
const installationId = parseInt(installationIdStr);
2324
if (!installationId) {
25+
console.error('❌ GITHUB_INSTALLATION_ID environment variable is missing or invalid');
2426
throw new Error('GITHUB_INSTALLATION_ID environment variable is required');
2527
}
2628

src/review/reviewer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ export const reviewDiff = async (diffContent: string, mrDetailsContent: string,
5757
}
5858
};
5959

60+
console.log('🔧 Amp settings with installation ID:', JSON.stringify(settings['amp.mcpServers']?.github?.env, null, 2));
61+
6062
writeFileSync(settingsFilePath, JSON.stringify(settings, null, 2), 'utf8');
6163

6264
const threadId = await newThread(tempDir);

src/routes/github.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const InstallationEventSchema = z.object({
2727
account: z.object({
2828
id: z.number(),
2929
login: z.string(),
30-
}),
30+
}).optional(),
3131
}),
3232
repositories: z.array(z.object({
3333
id: z.number(),

src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const reviewQueue = new ReviewJobQueue(queueConfig.max_queue_size, queueConfig.m
2727
// Set the review queue for the github routes
2828
setReviewQueue(reviewQueue);
2929

30-
// Mount GitHub routes (including OAuth and webhook)
30+
// Mount GitHub routes (including webhook)
3131
app.route('/github', github);
3232

3333
// Mount MCP routes

src/types/installation.ts

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)