-
Notifications
You must be signed in to change notification settings - Fork 63
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
fix: Update calls in project creation to download the entire repo #1326
Conversation
…e' of github.com:HubSpot/hubspot-cli into jy/fix-gh-rate-limit
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.
tested and everything lgtm!
yargs.example([ | ||
[ | ||
'$0 project create --template-source HubSpot/ui-extensions-examples', | ||
i18n(`${i18nKey}.examples.templateSource`), | ||
], | ||
]); |
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 was super confusing to use. Added an example
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.
just one question on punctuation, but otherwise the new example looks good to me
Description and Context
Depends on HubSpot/hubspot-local-dev-lib#224
The calls in project creation were fetching the individual files one by one instead of fetching the entire repo in one pass. This was increasing the rate at which we would hit the github rate limit, which is 60 rpm for unauthorized requests.
Testing
Here is a script I have been using to compare the diff of the directories generated by
hs create
andhs project create
in the prod (hs
) and local (yarn hs
) versions to verify the behavior remains the same. The last 3 create types require manual input that is unable to be overridden with command flags, so you will need to manually input data twice (once for prod and once for local). Make sure the fields you choose match or the diff will fail because the assets/names are different.You will need a token or this script will hit the rate limit.
To generate a token:
public_repo