Skip to content
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

Merged
merged 8 commits into from
Apr 27, 2020
Merged

Conversation

joaomoreno
Copy link
Member

@joaomoreno joaomoreno commented Apr 23, 2020

Related to #1664

@joaomoreno joaomoreno self-assigned this Apr 23, 2020
return await credentialStore.getHub()!;
}

const hub = await credentialStore.loginWithConfirmation();
Copy link
Contributor

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

Comment on lines +561 to +569
if (await credentialStore.hasOctokit()) {
return await credentialStore.getHub()!;
}

const hub = await credentialStore.loginWithConfirmation();

if (!hub) {
return credentialStore.login();
}
Copy link
Member Author

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?

Suggested change
if (await credentialStore.hasOctokit()) {
return await credentialStore.getHub()!;
}
const hub = await credentialStore.loginWithConfirmation();
if (!hub) {
return credentialStore.login();
}
return credentialStore.login();

Copy link
Contributor

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();
                }

@joaomoreno joaomoreno changed the title Publish to GitHub Publish to GitHub from no repo foler Apr 27, 2020
@joaomoreno joaomoreno changed the title Publish to GitHub from no repo foler Publish to GitHub from no repo folder Apr 27, 2020
@joaomoreno joaomoreno merged commit 644f975 into master Apr 27, 2020
@joaomoreno joaomoreno deleted the joao/publish-to-github branch April 27, 2020 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants