From d0d48dfd080e3c202821874a811f8d4a185e4588 Mon Sep 17 00:00:00 2001 From: shati-patel <42641846+shati-patel@users.noreply.github.com> Date: Fri, 3 Feb 2023 15:16:00 +0000 Subject: [PATCH] Add feature flag for codespaces-codeql template workspace We'll use this flag for commands that are specific to the tutorial code tour and "quick setup" in https://github.com/github/codespaces-codeql --- extensions/ql-vscode/src/config.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/extensions/ql-vscode/src/config.ts b/extensions/ql-vscode/src/config.ts index c753165d4..5853a6990 100644 --- a/extensions/ql-vscode/src/config.ts +++ b/extensions/ql-vscode/src/config.ts @@ -647,3 +647,16 @@ export class MockGitHubApiConfigListener export function getMockGitHubApiServerScenariosPath(): string | undefined { return MOCK_GH_API_SERVER_SCENARIOS_PATH.getValue(); } + +/** + * Enables features that are specific to the codespaces-codeql template workspace from + * https://github.com/github/codespaces-codeql. + */ +export const CODESPACES_CODE_TOUR = new Setting( + "codespacesTemplate", + ROOT_SETTING, +); + +export function isCodespacesTemplate() { + return !!CODESPACES_CODE_TOUR.getValue(); +}