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
This commit is contained in:
shati-patel
2023-02-03 15:16:00 +00:00
committed by Shati Patel
parent 0dd741fa9b
commit d0d48dfd08

View File

@@ -647,3 +647,16 @@ export class MockGitHubApiConfigListener
export function getMockGitHubApiServerScenariosPath(): string | undefined {
return MOCK_GH_API_SERVER_SCENARIOS_PATH.getValue<string>();
}
/**
* 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<boolean>();
}