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

Default account names for hs init and hs auth #979

Merged
merged 8 commits into from
Jan 23, 2024
Merged

Conversation

camden11
Copy link
Contributor

@camden11 camden11 commented Jan 17, 2024

Description and Context

Now that the localDevAuth endpoints returns hubName, we can use that name as a default when setting up a new account on the CLI via hs init or hs auth. This slightly refactors both of those commands to add support for this.

cc @adamawang This also fixes the lang errors with sandbox gate syncing

Screenshots

Screenshot 2024-01-17 at 2 05 45 PM

TODO

Who to Notify

@brandenrodgers

@@ -98,7 +104,11 @@ exports.handler = async options => {
case PERSONAL_ACCESS_KEY_AUTH_METHOD.value:
configData = await personalAccessKeyPrompt({ env, account });

updatedConfig = await updateConfigWithPersonalAccessKey(
token = await getAccessToken(configData.personalAccessKey, env);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need a try/catch like it had in the lib?

@brandenrodgers
Copy link
Contributor

IIRC there might be some sandboxes commands that make use of updateConfigWithPersonalAccessKey . Probably worth double checking for that.

Copy link
Contributor

@brandenrodgers brandenrodgers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@camden11 camden11 merged commit c83cf16 into master Jan 23, 2024
1 check passed
@camden11 camden11 deleted the default-account-name branch January 23, 2024 22:50
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