File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,15 +32,23 @@ export async function getSession(): Promise<vscode.AuthenticationSession | undef
3232
3333 signInPrompted = true ;
3434 const signInAction = "Sign in to GitHub" ;
35- const result = await vscode . window . showInformationMessage (
36- "Sign in to GitHub to access your repositories and GitHub Actions workflows." ,
37- signInAction
38- ) ;
39- if ( result === signInAction ) {
40- return await getSessionInternal ( true ) ;
41- }
35+ vscode . window
36+ . showInformationMessage ( "Sign in to GitHub to access your repositories and GitHub Actions workflows." , signInAction )
37+ . then (
38+ async result => {
39+ if ( result === signInAction ) {
40+ const session = await getSessionInternal ( true ) ;
41+ if ( session ) {
42+ await vscode . commands . executeCommand ( "setContext" , "github-actions.signed-in" , true ) ;
43+ }
44+ }
45+ } ,
46+ ( ) => {
47+ // Ignore rejected promise
48+ }
49+ ) ;
4250
43- // User chose to not sign in
51+ // User chose to not sign in or hasn't signed in yet
4452 return undefined ;
4553}
4654
You can’t perform that action at this time.
0 commit comments