-
Notifications
You must be signed in to change notification settings - Fork 56
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
Roll hs init step into hs project upload #564
Conversation
try { | ||
await fetchProject(accountId, projectName); | ||
} catch (err) { | ||
if (err.statusCode === 404) { |
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.
This may not be worth supporting, but what if we get a 500 or some other internal error code?
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.
My intent was for https://github.com/HubSpot/hubspot-cli/pull/564/files/370500c158ffbe7d34e32fdfef2c1ebdff146f1f#diff-fa4fa15b34bd2259fc2c24ec990fdbaa6492e6030d940700895318b399058174R150 to handle any other error codes that might come through
|
||
validateProjectConfig(projectConfig); | ||
await ensureProjectExists(accountId, projectConfig.name); |
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.
Are we sure that accountId exists here? I was seeing an issue when testing this (sometime last week) where it was logging The project <Project name> does not exist in undefined. Would you like to create it?
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.
hmm.. it's possible that was before 370500c but I will double check this
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.
So yeah, I believe accountId should always exist here. If it doesn't https://github.com/HubSpot/hubspot-cli/pull/564/files#diff-1989a521c805539a7ae5e60fa3f7b0f79d83106bbb225045cf33f831abf97757R98 should be ending the process
I had two questions, but otherwise this looks good to me 👌 |
Description and Context
Now as part of the
hs project upload
command, we:hs project init
When no config is found:
When config is found but project doesn't exist in account:
Screenshots
TODO
The next step here is to rename and update the existing
hs project init
function tohs project create
and build out that commandWho to Notify