-
-
Notifications
You must be signed in to change notification settings - Fork 28
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: avoid creating blobs for UTF-8 text files #133
Conversation
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.
any chance you could just remove the blob creation request instead of updating the whole fixture?
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.
done
How do you know? I'm not aware this is the case |
Experience, I looked for docs on the secondary rate limits but didn't find anything concrete. Others are also unable to find documentation. The secondary limit doesn't appear to be returned in headers, either -- tested with an app and user token :/ |
035ac9e
to
b786a32
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.
great pull request, thanks a bunch 💐
🎉 This PR is included in version 5.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
To open a pull request using GitHub's API, it's necessary to create a tree, where you can either specify file contents as a string, or the hash of a blob that's already been pushed to GitHub. Creating blobs requires an API call, while specifying file contents does not. GitHub has a low secondary rate limit for creating blobs.
This PR makes it so fewer files are sent as binary blobs. UTF-8 files do not need to be sent up as blobs, they can be included in the tree as their literal contents.
The fixture update is a bit of a mess but I'm not sure if I can do it better.
See also: #121