Skip to content

Commit 36fedac

Browse files
authored
Merge pull request #174 from henrymercer/settings-scope
Change distribution settings to machine scope
2 parents a559404 + 8400f75 commit 36fedac

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

extensions/ql-vscode/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"title": "CodeQL",
8383
"properties": {
8484
"codeQL.cli.executablePath": {
85-
"scope": "window",
85+
"scope": "machine",
8686
"type": "string",
8787
"default": "",
8888
"description": "Path to the CodeQL executable that should be used by the CodeQL extension. The executable is named `codeql` on Linux/Mac and `codeql.cmd` on Windows. This overrides all other CodeQL CLI settings."

extensions/ql-vscode/src/config.ts

+3-13
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,16 @@ const DISTRIBUTION_SETTING = new Setting('cli', ROOT_SETTING);
3737
const CUSTOM_CODEQL_PATH_SETTING = new Setting('executablePath', DISTRIBUTION_SETTING);
3838
const INCLUDE_PRERELEASE_SETTING = new Setting('includePrerelease', DISTRIBUTION_SETTING);
3939
const PERSONAL_ACCESS_TOKEN_SETTING = new Setting('personalAccessToken', DISTRIBUTION_SETTING);
40-
const OWNER_NAME_SETTING = new Setting('owner', DISTRIBUTION_SETTING);
41-
const REPOSITORY_NAME_SETTING = new Setting('repository', DISTRIBUTION_SETTING);
4240

4341
/** When these settings change, the distribution should be updated. */
44-
const DISTRIBUTION_CHANGE_SETTINGS = [CUSTOM_CODEQL_PATH_SETTING, INCLUDE_PRERELEASE_SETTING, PERSONAL_ACCESS_TOKEN_SETTING, OWNER_NAME_SETTING, REPOSITORY_NAME_SETTING];
42+
const DISTRIBUTION_CHANGE_SETTINGS = [CUSTOM_CODEQL_PATH_SETTING, INCLUDE_PRERELEASE_SETTING, PERSONAL_ACCESS_TOKEN_SETTING];
4543

4644
export interface DistributionConfig {
4745
customCodeQlPath?: string;
4846
includePrerelease: boolean;
4947
personalAccessToken?: string;
50-
ownerName: string;
51-
repositoryName: string;
48+
ownerName?: string;
49+
repositoryName?: string;
5250
onDidChangeDistributionConfiguration?: Event<void>;
5351
}
5452

@@ -114,14 +112,6 @@ export class DistributionConfigListener extends ConfigListener implements Distri
114112
return PERSONAL_ACCESS_TOKEN_SETTING.getValue() ? PERSONAL_ACCESS_TOKEN_SETTING.getValue() : undefined;
115113
}
116114

117-
public get ownerName(): string {
118-
return OWNER_NAME_SETTING.getValue();
119-
}
120-
121-
public get repositoryName(): string {
122-
return REPOSITORY_NAME_SETTING.getValue();
123-
}
124-
125115
public get onDidChangeDistributionConfiguration(): Event<void> {
126116
return this._onDidChangeConfiguration.event;
127117
}

0 commit comments

Comments
 (0)