-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish to GitHub from no repo folder #1686
Conversation
return await credentialStore.getHub()!; | ||
} | ||
|
||
const hub = await credentialStore.loginWithConfirmation(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I missed this in your other PR, but I think we can simplify this to just calling credentialStore.login
. Otherwise the behavior is that the user sees a notification asking them to sign in, and if they cancel it, they get a dialog asking if the extension can sign in. I think we can skip the notification step, this is used just when the extension is starting up
if (await credentialStore.hasOctokit()) { | ||
return await credentialStore.getHub()!; | ||
} | ||
|
||
const hub = await credentialStore.loginWithConfirmation(); | ||
|
||
if (!hub) { | ||
return credentialStore.login(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RMacfarlane You mean something like this?
if (await credentialStore.hasOctokit()) { | |
return await credentialStore.getHub()!; | |
} | |
const hub = await credentialStore.loginWithConfirmation(); | |
if (!hub) { | |
return credentialStore.login(); | |
} | |
return credentialStore.login(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like this:
if (await credentialStore.hasOctokit()) {
return await credentialStore.getHub()!;
} else {
return await credentialStore.login();
}
Related to #1664