这是indexloc提供的服务,不要输入任何密码
Skip to content

Prep before SSO login flow work #798

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 9 commits into from
Mar 2, 2022
Merged

Prep before SSO login flow work #798

merged 9 commits into from
Mar 2, 2022

Conversation

gsoltis
Copy link
Contributor

@gsoltis gsoltis commented Mar 1, 2022

  • Starts using cobra for the login command. This can serve as a model for an eventual migration to cobra for everything
  • turbo login should now respect Ctrl+C
  • Make golint (mostly) happy for login.go
  • Pass dependencies into run function to make it a bit more testable
  • Add a test for the happy path of logging in
  • Provides a default cli.ColoredUi util
  • OpenBrowser now returns an error rather than fatally exiting.

@vercel
Copy link

vercel bot commented Mar 1, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/vercel/turbo-site/32ZWMkVUHofRkGn7N1pK4K3oYJo6
✅ Preview: https://turbo-site-git-gsoltis-addlogintest.vercel.sh

@gsoltis
Copy link
Contributor Author

gsoltis commented Mar 1, 2022

@xenfo this PR includes an example of what I mean by gradually adopting cobra. It will still take some effort to wire it up to a root command in the future, but we can do that once all of the subcommands have been transitioned.

@gsoltis gsoltis marked this pull request as ready for review March 1, 2022 22:42
@samchouse
Copy link
Contributor

@gsoltis should I continue how I am doing it right now and figure out how to appropriately commit to main once the PR is ready?

@gsoltis
Copy link
Contributor Author

gsoltis commented Mar 2, 2022

@xenfo As a reviewer, I would find it much easier to go one command per PR. Then we could do a final PR to wire them all up to a root command.

FWIW, I'm excited to see this happening and think it's a good step. There's no reason turbo needs to do its own special flag parsing.

})
},
}
loginCommand.SetArgs(args)
Copy link
Contributor

Choose a reason for hiding this comment

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

:smart_meme:

@kodiakhq kodiakhq bot merged commit 7a43562 into main Mar 2, 2022
@gsoltis gsoltis deleted the gsoltis/add_login_test branch March 2, 2022 18:03
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.

3 participants