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
feat(CLI Onboarding): Auto login if --org
flag provided
#10510
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10510 +/- ##
==========================================
- Coverage 85.83% 85.83% -0.01%
==========================================
Files 335 335
Lines 13930 13937 +7
==========================================
+ Hits 11957 11963 +6
- Misses 1973 1974 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 👍
Nope, the proposed version only checks |
👍 agreed, the same behavior should apply in that case. |
0bc890e
to
a1679e0
Compare
Boolean(context.options.org) || | ||
Boolean(context.configuration.org) || | ||
(await loginOrRegisterQuestion(context.stepHistory)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need for Boolean
wrappers.
Sometimes it's good to ensure that given property, or function result, consistently represents boolean (it's also about not holding onto some objects which otherwise could be cleared from memory), but here it's just part of internal conditional.
'Enable Serverless Dashboard to get enhanced monitoring, logs and secrets management: https://serverless.com/monitoring\n\n' | ||
); | ||
if (context.initial.isInServiceContext && !context.initial.isDashboardEnabled) { | ||
const isOrgProvided = Boolean(context.options.org) || Boolean(context.configuration.org); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
a1679e0
to
63d46f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Reported internally, related to changes in onboarding flow.
Question: Should we also have similar behavior if it's existing service with
org
configured already in service config? @medikoo @mnapoli