-
Notifications
You must be signed in to change notification settings - Fork 13
feat: download purely using octokit #424
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
Conversation
In my understanding octokit automatically uses authentication, but the real download was done using fetch directly, hence without authentication. This approach now uses octokit's getReleaseAsset() to download the asset, which should use proper authentication, hence allowing potentially higher rate limits. Closes: #419
8fe9058 to
5f4fdab
Compare
src/index.ts
Outdated
| if (!(await isReady())) { | ||
| try { | ||
| const [name, assets] = await findRelease(VERSION) | ||
| const [name, asset_id, asset_filetype] = await findRelease(VERSION) |
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.
nitpick (not blocking at all), but just saying, we should use the convention of the language for naming variables and in JavaScript it's camelCase.
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.
good point. I probably chose that name from the GitHub API call parameter where assetId is ultimately being used. Ideally I'd have passed the entire asset but I'm currently not clever enough for understanding how to either define or find out the proper typescript type for that..
|
@klaernie I can gladly test this branch, but am having some difficulty installing the branch with NPM. I've never had to do this before, but from Stackoverflow I found that I should be able to use: But this does not seem to work: |
|
Well, we can release a beta if needed. First we need to update |
|
I would say, we can even directly release this as stable. CI is green, and everything seems to work fine. We can always revert it, if really needed. |
|
🎉 This PR is included in version 6.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
In my understanding octokit automatically uses authentication, but the
real download was done using fetch directly, hence without
authentication.
This approach now uses octokit's getReleaseAsset() to download the
asset, which should use proper authentication, hence allowing
potentially higher rate limits.
Closes: #419