Skip to content

Commit 12002f2

Browse files
committed
wip integrating review agent into monorepo
1 parent 17fce5c commit 12002f2

18 files changed

+667
-899
lines changed

.env.development

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,10 @@ SOURCEBOT_TELEMETRY_DISABLED=true # Disables telemetry collection
7878
# NODE_ENV=
7979
# SOURCEBOT_TENANCY_MODE=single
8080

81-
# NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT=
81+
# NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT=
82+
83+
# Used for agents
84+
# GITHUB_APP_ID=
85+
# GITHUB_APP_PRIVATE_KEY_PATH=
86+
# GITHUB_APP_WEBHOOK_SECRET=
87+
# OPENAI_API_KEY=

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"private": true,
33
"workspaces": [
4-
"packages/*"
4+
"packages/*",
5+
"packages/agents/*"
56
],
67
"scripts": {
78
"build": "cross-env SKIP_ENV_VALIDATION=1 yarn workspaces foreach -A run build",

packages/agents/reviewAgent/src/app.ts renamed to packages/agents/review-agent/src/app.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,11 @@ app.webhooks.onError((error) => {
5252
console.error(error);
5353
});
5454

55-
5655
const port = 3050;
57-
const host = 'localhost';
5856
const path = "/api/webhook";
59-
const localWebhookUrl = `http://${host}:${port}${path}`;
6057

6158
const middleware = createNodeMiddleware(app.webhooks, { path });
6259

6360
http.createServer(middleware).listen(port, () => {
64-
console.log(`Server is listening for events at: ${localWebhookUrl}`);
65-
console.log('Press Ctrl + C to quit.')
61+
console.log(`Http server for review agent running on port ${port} ${path}`);
6662
});
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { createEnv } from "@t3-oss/env-core";
2+
import { z } from "zod";
3+
4+
export const env = createEnv({
5+
server: {
6+
GITHUB_APP_ID: z.string(),
7+
GITHUB_APP_WEBHOOK_SECRET: z.string(),
8+
GITHUB_APP_PRIVATE_KEY_PATH: z.string(),
9+
},
10+
runtimeEnv: process.env,
11+
emptyStringAsUndefined: true,
12+
skipValidation: process.env.SKIP_ENV_VALIDATION === "1",
13+
})

packages/agents/reviewAgent/nodes/fetch_file_content.ts

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

0 commit comments

Comments
 (0)