Skip to content

Commit 4aef43b

Browse files
authored
fix(settings): Remove API key from settings (#30)
* fix(settings): Remove API key from settings * chore(authentication): open sidebar on authnetication
1 parent b0e1efa commit 4aef43b

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

src/extension.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ export function activate(context: ExtensionContext) {
246246
}
247247
),
248248
commands.registerCommand("gitguardian.authenticate", async () => {
249+
commands.executeCommand("gitguardian.openSidebar");
249250
const isAuthenticated = await loginGGShield(
250251
ggshieldResolver.configuration,
251252
outputChannel,

src/lib/ggshield-api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ export function ggshieldApiKey(
305305
} else {
306306
console.log(proc.stdout);
307307
const apiUrl = configuration.apiUrl;
308-
const re = /api/;
309308

310309
const regexInstanceSection = `\\[${apiToDashboard(apiUrl)}\\]([\\s\\S]*?)(?=\\[|$)`;
311310
const instanceSectionMatch = proc.stdout.match(regexInstanceSection);

src/lib/ggshield-configuration.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,5 @@ export function getConfiguration(
3939
}
4040

4141
export function setApiKey(configuration: GGShieldConfiguration, apiKey: string | undefined): void {
42-
const config = workspace.getConfiguration("gitguardian");
4342
configuration.apiKey = apiKey ? apiKey : "";
44-
config.update("apiKey", apiKey, ConfigurationTarget.Global);
4543
}

0 commit comments

Comments
 (0)