Skip to content

Commit e230bf4

Browse files
authored
When adding repo, check whether name exists in specified parent list (#1977)
1 parent 6c523db commit e230bf4

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

extensions/ql-vscode/src/databases/config/db-config-store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export class DbConfigStore extends DisposableObject {
153153
throw Error("Repository name cannot be empty");
154154
}
155155

156-
if (this.doesRemoteDbExist(repoNwo)) {
156+
if (this.doesRemoteDbExist(repoNwo, parentList)) {
157157
throw Error(
158158
`A variant analysis repository with the name '${repoNwo}' already exists`,
159159
);

extensions/ql-vscode/test/vscode-tests/minimal-workspace/databases/db-panel.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ describe("db panel", () => {
500500
repositories: ["owner1/repo1"],
501501
},
502502
],
503+
remoteRepos: ["owner2/repo2"],
503504
});
504505

505506
await saveDbConfig(dbConfig);

0 commit comments

Comments
 (0)