Skip to content

cli: prompt for organization on login #19107

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

Merged
merged 6 commits into from
Nov 23, 2023
Merged

cli: prompt for organization on login #19107

merged 6 commits into from
Nov 23, 2023

Conversation

filiptronicek
Copy link
Member

@filiptronicek filiptronicek commented Nov 21, 2023

Description

If the user is a member of more than one organization, let them choose one upon login, interactively.

It looks like this and can be turned off with --non-interactive

image
Summary generated by Copilot

🤖[deprecated] Generated by Copilot at 2e5a95e

This pull request enhances the local app's login command with a new flag for non-interactive login and better error messages. It also adds a new dependency on promptui for interactive prompts and updates the go.mod file accordingly.

Related Issue(s)

Fixes EXP-954

How to test

Try to login on https://gitpod.io with no explicit org set.

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft preemptible
    Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

If the user is a member of more than one organization, let them choose one upon login, interactively.
@mustard-mh
Copy link
Contributor

@filiptronicek If user's network is not that good (like me), it will take seconds to get organizations, during this time, there's nothing in terminal, so I quit the process once. Could we show a loading state during that time?

@mustard-mh
Copy link
Contributor

mustard-mh commented Nov 23, 2023

Since we can create context for different org with the same host, so it will be good to show/store org name in context, or make org name a part of context name. (Will create issue for it)

It seems is a bug
image

Copy link
Contributor

@mustard-mh mustard-mh left a comment

Choose a reason for hiding this comment

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

👍

@filiptronicek
Copy link
Member Author

@mustard-mh this is a good one. I will add an indicator about loading and clear it right after

@roboquat roboquat merged commit 9737e97 into main Nov 23, 2023
@roboquat roboquat deleted the ft/cli-no-org-infer branch November 23, 2023 14:22
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.

4 participants