@@ -10,10 +10,7 @@ import {
1010 scanFile ,
1111 showAPIQuota ,
1212} from "./lib/ggshield-api" ;
13- import {
14- getConfiguration ,
15- setApiKey ,
16- } from "./lib/ggshield-configuration-utils" ;
13+ import { getConfiguration } from "./lib/ggshield-configuration-utils" ;
1714import {
1815 ExtensionContext ,
1916 Uri ,
@@ -138,7 +135,6 @@ export function activate(context: ExtensionContext) {
138135 ggshieldAuthStatus ( configuration , context ) ;
139136 if ( context . globalState . get ( "isAuthenticated" , false ) ) {
140137 updateStatusBarItem ( StatusBarStatus . ready ) ;
141- setApiKey ( configuration , ggshieldApiKey ( configuration ) ) ;
142138 ggshieldViewProvider . refresh ( ) ;
143139 ggshieldRemediationMessageViewProvider . refresh ( ) ;
144140 ggshieldQuotaViewProvider . refresh ( ) ;
@@ -219,7 +215,6 @@ export function activate(context: ExtensionContext) {
219215 . then ( ( ) => {
220216 if ( context . globalState . get ( "isAuthenticated" , false ) ) {
221217 updateStatusBarItem ( StatusBarStatus . ready ) ;
222- setApiKey ( configuration , ggshieldApiKey ( configuration ) ) ;
223218 } else {
224219 updateStatusBarItem ( StatusBarStatus . unauthenticated ) ;
225220 }
@@ -234,7 +229,6 @@ export function activate(context: ExtensionContext) {
234229 commands . registerCommand ( "gitguardian.logout" , async ( ) => {
235230 logoutGGShield ( ggshieldResolver . configuration , context ) ;
236231 updateStatusBarItem ( StatusBarStatus . unauthenticated ) ;
237- setApiKey ( configuration , undefined ) ;
238232 ggshieldViewProvider . refresh ( ) ;
239233 ggshieldRemediationMessageViewProvider . refresh ( ) ;
240234 ggshieldQuotaViewProvider . refresh ( ) ;
0 commit comments