@@ -7,17 +7,17 @@ const DEFAULT_GITHUB_API = "https://api.github.com";
77
88export function initConfiguration ( context : vscode . ExtensionContext ) {
99 context . subscriptions . push (
10- vscode . workspace . onDidChangeConfiguration ( e => {
10+ vscode . workspace . onDidChangeConfiguration ( async e => {
1111 if ( e . affectsConfiguration ( getSettingsKey ( "workflows.pinned" ) ) ) {
1212 pinnedWorkflowsChangeHandlers . forEach ( h => h ( ) ) ;
1313 } else if (
1414 e . affectsConfiguration ( getSettingsKey ( "use-enterprise" ) ) ||
15- ( isUseEnterprise ( ) &&
15+ ( useEnterprise ( ) &&
1616 ( e . affectsConfiguration ( "github-enterprise.uri" ) || e . affectsConfiguration ( getSettingsKey ( "remote-name" ) ) ) )
1717 ) {
18- updateLanguageServerApiUrl ( context ) ;
18+ await updateLanguageServerApiUrl ( context ) ;
1919 resetGitHubContext ( ) ;
20- vscode . commands . executeCommand ( "github-actions.explorer.refresh" ) ;
20+ await vscode . commands . executeCommand ( "github-actions.explorer.refresh" ) ;
2121 }
2222 } )
2323 ) ;
@@ -64,18 +64,18 @@ export function getRemoteName(): string {
6464 return getConfiguration ( ) . get < string > ( getSettingsKey ( "remote-name" ) , "origin" ) ;
6565}
6666
67- export function isUseEnterprise ( ) : boolean {
67+ export function useEnterprise ( ) : boolean {
6868 return getConfiguration ( ) . get < boolean > ( getSettingsKey ( "use-enterprise" ) , false ) ;
6969}
7070
7171export function getGitHubApiUri ( ) : string {
72- if ( ! isUseEnterprise ( ) ) return DEFAULT_GITHUB_API ;
72+ if ( ! useEnterprise ( ) ) return DEFAULT_GITHUB_API ;
7373 const base = getConfiguration ( ) . get < string > ( "github-enterprise.uri" , DEFAULT_GITHUB_API ) . replace ( / \/ $ / , "" ) ;
7474 return base === DEFAULT_GITHUB_API ? base : `${ base } /api/v3` ;
7575}
7676
77- function updateLanguageServerApiUrl ( context : vscode . ExtensionContext ) {
78- deactivateLanguageServer ( ) ;
77+ async function updateLanguageServerApiUrl ( context : vscode . ExtensionContext ) {
78+ await deactivateLanguageServer ( ) ;
7979
80- initLanguageServer ( context ) ;
80+ await initLanguageServer ( context ) ;
8181}
0 commit comments