Skip to content

Commit 6c92a5b

Browse files
committed
Merge remote-tracking branch 'upstream/main' into aeisenberg/flush-cache-on-db-remove
2 parents 376d6b7 + db0d062 commit 6c92a5b

File tree

6 files changed

+23
-63
lines changed

6 files changed

+23
-63
lines changed

extensions/ql-vscode/package-lock.json

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions/ql-vscode/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,7 +1988,7 @@
19881988
"node-fetch": "^2.6.7",
19891989
"p-queue": "^8.0.1",
19901990
"react": "^18.3.1",
1991-
"react-dom": "^18.2.0",
1991+
"react-dom": "^18.3.1",
19921992
"semver": "^7.6.2",
19931993
"source-map": "^0.7.4",
19941994
"source-map-support": "^0.5.21",
@@ -2042,7 +2042,7 @@
20422042
"@types/node": "18.18.*",
20432043
"@types/node-fetch": "^2.5.2",
20442044
"@types/react": "^18.3.1",
2045-
"@types/react-dom": "^18.2.18",
2045+
"@types/react-dom": "^18.3.0",
20462046
"@types/sarif": "^2.1.2",
20472047
"@types/semver": "^7.5.8",
20482048
"@types/stream-json": "^1.7.1",

extensions/ql-vscode/src/config.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -680,11 +680,6 @@ export function getVariantAnalysisDefaultResultsSort(): SortKey {
680680
*/
681681
const ACTION_BRANCH = new Setting("actionBranch", VARIANT_ANALYSIS_SETTING);
682682

683-
export const VARIANT_ANALYSIS_ENABLE_GHEC_DR = new Setting(
684-
"enableGhecDr",
685-
VARIANT_ANALYSIS_SETTING,
686-
);
687-
688683
export function getActionBranch(): string {
689684
return ACTION_BRANCH.getValue<string>() || "main";
690685
}
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
import {
2-
VARIANT_ANALYSIS_ENABLE_GHEC_DR,
3-
hasEnterpriseUri,
4-
hasGhecDrUri,
5-
} from "../config";
1+
import { hasEnterpriseUri, hasGhecDrUri } from "../config";
62

73
/**
84
* Determines whether MRVA should be enabled or not for the current GitHub host.
5+
* MRVA is enabled on github.com and GHEC-DR.
96
* This is based on the `github-enterprise.uri` setting.
107
*/
118
export function isVariantAnalysisEnabledForGitHubHost(): boolean {
12-
return (
13-
// MRVA is always enabled on github.com
14-
!hasEnterpriseUri() ||
15-
// MRVA can be enabled on GHEC-DR using a feature flag
16-
(hasGhecDrUri() && !!VARIANT_ANALYSIS_ENABLE_GHEC_DR.getValue<boolean>())
17-
);
9+
return !hasEnterpriseUri() || hasGhecDrUri();
1810
}

extensions/ql-vscode/supported_cli_versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[
2-
"v2.17.2",
2+
"v2.17.3",
33
"v2.16.6",
44
"v2.15.5",
55
"v2.14.6",
Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,25 @@
11
import { ConfigurationTarget } from "vscode";
2-
import {
3-
VARIANT_ANALYSIS_ENABLE_GHEC_DR,
4-
VSCODE_GITHUB_ENTERPRISE_URI_SETTING,
5-
} from "../../../../src/config";
2+
import { VSCODE_GITHUB_ENTERPRISE_URI_SETTING } from "../../../../src/config";
63
import { isVariantAnalysisEnabledForGitHubHost } from "../../../../src/variant-analysis/ghec-dr";
74

85
describe("checkVariantAnalysisEnabled", () => {
9-
it("returns cleanly when no enterprise URI is set", async () => {
6+
it("returns true when no enterprise URI is set", async () => {
107
expect(isVariantAnalysisEnabledForGitHubHost()).toBe(true);
118
});
129

13-
it("returns false when GHES enterprise URI is set and variant analysis feature flag is not set", async () => {
10+
it("returns false when GHES enterprise URI is set", async () => {
1411
await VSCODE_GITHUB_ENTERPRISE_URI_SETTING.updateValue(
1512
"https://github.example.com",
1613
ConfigurationTarget.Global,
1714
);
1815
expect(isVariantAnalysisEnabledForGitHubHost()).toBe(false);
1916
});
2017

21-
it("returns false when GHES enterprise URI is set and variant analysis feature flag is set", async () => {
22-
await VSCODE_GITHUB_ENTERPRISE_URI_SETTING.updateValue(
23-
"https://github.example.com",
24-
ConfigurationTarget.Global,
25-
);
26-
await VARIANT_ANALYSIS_ENABLE_GHEC_DR.updateValue(
27-
"true",
28-
ConfigurationTarget.Global,
29-
);
30-
expect(isVariantAnalysisEnabledForGitHubHost()).toBe(false);
31-
});
32-
33-
it("returns false when GHEC-DR URI is set and variant analysis feature flag is not set", async () => {
18+
it("returns true when a GHEC-DR URI is set", async () => {
3419
await VSCODE_GITHUB_ENTERPRISE_URI_SETTING.updateValue(
3520
"https://example.ghe.com",
3621
ConfigurationTarget.Global,
3722
);
38-
expect(isVariantAnalysisEnabledForGitHubHost()).toBe(false);
39-
});
40-
41-
it("returns true when GHEC-DR URI is set and variant analysis feature flag is set", async () => {
42-
await VSCODE_GITHUB_ENTERPRISE_URI_SETTING.updateValue(
43-
"https://example.ghe.com",
44-
ConfigurationTarget.Global,
45-
);
46-
await VARIANT_ANALYSIS_ENABLE_GHEC_DR.updateValue(
47-
"true",
48-
ConfigurationTarget.Global,
49-
);
5023
expect(isVariantAnalysisEnabledForGitHubHost()).toBe(true);
5124
});
5225
});

0 commit comments

Comments
 (0)