Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions extensions/ql-vscode/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,48 +478,6 @@ export const NO_CACHE_AST_VIEWER = new Setting(
// Settings for variant analysis
const VARIANT_ANALYSIS_SETTING = new Setting("variantAnalysis", ROOT_SETTING);

/**
* Lists of GitHub repositories that you want to query remotely via the "Run Variant Analysis" command.
* Note: This command is only available for internal users.
*
* This setting should be a JSON object where each key is a user-specified name (string),
* and the value is an array of GitHub repositories (of the form `<owner>/<repo>`).
*/
const REMOTE_REPO_LISTS = new Setting(
"repositoryLists",
VARIANT_ANALYSIS_SETTING,
);

export function getRemoteRepositoryLists():
| Record<string, string[]>
| undefined {
return REMOTE_REPO_LISTS.getValue<Record<string, string[]>>() || undefined;
}

export async function setRemoteRepositoryLists(
lists: Record<string, string[]> | undefined,
) {
await REMOTE_REPO_LISTS.updateValue(lists, ConfigurationTarget.Global);
}

/**
* Path to a file that contains lists of GitHub repositories that you want to query remotely via
* the "Run Variant Analysis" command.
* Note: This command is only available for internal users.
*
* This setting should be a path to a JSON file that contains a JSON object where each key is a
* user-specified name (string), and the value is an array of GitHub repositories
* (of the form `<owner>/<repo>`).
*/
const REPO_LISTS_PATH = new Setting(
"repositoryListsPath",
VARIANT_ANALYSIS_SETTING,
);

export function getRemoteRepositoryListsPath(): string | undefined {
return REPO_LISTS_PATH.getValue<string>() || undefined;
}

/**
* The name of the "controller" repository that you want to use with the "Run Variant Analysis" command.
* Note: This command is only available for internal users.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ import {
} from "vscode";
import { CodeQLExtensionInterface } from "../../../../src/extension";
import { extLogger } from "../../../../src/common";
import {
setRemoteControllerRepo,
setRemoteRepositoryLists,
} from "../../../../src/config";
import { setRemoteControllerRepo } from "../../../../src/config";
import * as ghApiClient from "../../../../src/variant-analysis/gh-api/gh-api-client";
import * as ghActionsApiClient from "../../../../src/variant-analysis/gh-api/gh-actions-api-client";
import * as fs from "fs-extra";
Expand Down Expand Up @@ -156,9 +153,6 @@ describe("Variant Analysis Manager", () => {

// always run in the vscode-codeql repo
await setRemoteControllerRepo("github/vscode-codeql");
await setRemoteRepositoryLists({
"vscode-codeql": ["github/vscode-codeql"],
});

// Only new version support `${workspace}` in qlpack.yml
originalDeps = await fixWorkspaceReferences(
Expand Down