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

Automatically select organisation if there is only one connected to the account #91

Merged
merged 1 commit into from
Mar 8, 2023

Conversation

inteon
Copy link
Contributor

@inteon inteon commented Feb 24, 2023

This automation removes one step (running "jsctl config set organization [name]") from the getting started flow.

@inteon inteon requested a review from wallrj March 8, 2023 11:09
…he account

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
Copy link
Member

@wallrj wallrj left a comment

Choose a reason for hiding this comment

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

Thanks.

It looks like it should work, but my account has multiple organizations so haven't been able to test that scenario.

/lgtm

Comment on lines +53 to +58
// if the user already has an organization selected, we don't need to do anything
cnf, ok := config.FromContext(ctx)
if ok && cnf.Organization != "" {
return nil
}

Copy link
Member

Choose a reason for hiding this comment

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

👍

@inteon inteon merged commit d91d11f into main Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants