-
Notifications
You must be signed in to change notification settings - Fork 170
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Git connections defined in config.json cause errors and don't load in the UI. The connectionType field gets set to "git" instead of "generic-git-host", causing the application to fail when processing these connections.
packages/backend/src/configManager.ts:85 assigns newConnectionConfig.type (which is "git" from the v3 config schema) directly to the connectionType field, but the codebase expects "generic-git-host".
To reproduce
- Add a git connection to config.json:
{
"connections": {
"my-repos": {
"type": "git",
"url": "file:///repos/my-org/*"
}
}
}
- Attempt to load the connections view in a browser.
Sourcebot deployment information
Sourcebot version (e.g. v3.0.1): v4.8.1
Additional information
I have applied the following patch to my local build in the meantime to get around the issue:
diff --git a/packages/backend/src/configManager.ts b/packages/backend/src/configManager.ts
index 14c6b0d..2e5ca51 100644
--- a/packages/backend/src/configManager.ts
+++ b/packages/backend/src/configManager.ts
@@ -82,7 +82,7 @@ export class ConfigManager {
data: {
name: key,
config: newConnectionConfig as unknown as Prisma.InputJsonValue,
- connectionType: newConnectionConfig.type,
+ connectionType: newConnectionConfig.type === 'git' ? 'generic-git-host' : newConnectionConfig.type,
isDeclarative: true,
org: {
connect: {
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working