diff --git a/changelog.d/617.bugfix b/changelog.d/617.bugfix new file mode 100644 index 00000000..d8d88539 --- /dev/null +++ b/changelog.d/617.bugfix @@ -0,0 +1 @@ +You can now add multiple GitLab connections to the same room with the same project path, if they are under different instances. \ No newline at end of file diff --git a/src/Connections/GitlabRepo.ts b/src/Connections/GitlabRepo.ts index ac0d3f42..09111cd7 100644 --- a/src/Connections/GitlabRepo.ts +++ b/src/Connections/GitlabRepo.ts @@ -206,7 +206,7 @@ export class GitLabRepoConnection extends CommandConnection c.roomId === roomId && c.path === connection.path); + const existing = existingConnections.find(c => c.roomId === roomId && c.instance.url === connection.instance.url && c.path === connection.path); if (existing) { throw new ApiError("A GitLab repo connection for this project already exists", ErrCode.ConflictingConnection, -1, {