-
Notifications
You must be signed in to change notification settings - Fork 273
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
chore: move Garden Cloud utils to own module #5435
Conversation
expect(getCloudDistributionName("https://backend.app.garden")).to.eql("Garden Cloud") | ||
}) | ||
|
||
// TODO: should we care about http/https here? Do we always get only https:// urls? |
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 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.
Can we use the URL library to construct a URL from the string and just read the hostname so that we don't need to worry about the protocol.
It could just throw if the name isn't a valid hostname. It'd be a runtime error but we'd have runtime issues anyway if the hostname is bad.
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.
expect(getCloudDistributionName("https://backend.app.garden")).to.eql("Garden Cloud") | ||
}) | ||
|
||
// TODO: should we care about http/https here? Do we always get only https:// urls? |
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.
Can we use the URL library to construct a URL from the string and just read the hostname so that we don't need to worry about the protocol.
It could just throw if the name isn't a valid hostname. It'd be a runtime error but we'd have runtime issues anyway if the hostname is bad.
d0e32f5
to
ae0a261
Compare
ae0a261
to
b0b5c69
Compare
What this PR does / why we need it:
This is the continuation of the util-refactoring PR series started in #5431.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: