Skip to content

Commit 205854f

Browse files
committed
fix: restart language server on secrets configuration change
1 parent abfaf75 commit 205854f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/configuration/configuration.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ export function initConfiguration(context: vscode.ExtensionContext) {
1515
(useEnterprise() &&
1616
(e.affectsConfiguration("github-enterprise.uri") || e.affectsConfiguration(getSettingsKey("remote-name"))))
1717
) {
18-
await updateLanguageServerApiUrl(context);
18+
await restartLanguageServer(context);
1919
resetGitHubContext();
2020
await vscode.commands.executeCommand("github-actions.explorer.refresh");
21+
} else if (e.affectsConfiguration(getSettingsKey("validation.secrets"))) {
22+
await restartLanguageServer(context);
2123
}
2224
})
2325
);
@@ -82,8 +84,7 @@ export function getGitHubApiUri(): string {
8284
}
8385
}
8486

85-
async function updateLanguageServerApiUrl(context: vscode.ExtensionContext) {
87+
async function restartLanguageServer(context: vscode.ExtensionContext) {
8688
await deactivateLanguageServer();
87-
8889
await initLanguageServer(context);
8990
}

0 commit comments

Comments
 (0)