Skip to content

Conversation

@klaernie
Copy link
Member

@klaernie klaernie commented Jun 26, 2025

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

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
@klaernie
Copy link
Member Author

@vbode: I understand from #425 that you have an environment frequently affected by rate limiting from GitHub - could you please test if this branch works better?

theoludwig
theoludwig previously approved these changes Jun 26, 2025
src/index.ts Outdated
if (!(await isReady())) {
try {
const [name, assets] = await findRelease(VERSION)
const [name, asset_id, asset_filetype] = await findRelease(VERSION)
Copy link
Member

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.

Copy link
Member Author

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..

@vbode
Copy link

vbode commented Jun 30, 2025

@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:

npm install "https://github.com/editorconfig-checker/editorconfig-checker.git#octokit-down
load" --save

But this does not seem to work:
vincentb@WS-HST8PG3:/mnt/c/Repositories/build/test$ npm install "https://github.com/editorconfig-checker/editorconfig-checker.git#octokit-down load" --save npm error code 1 npm error The git reference could not be found npm error command git --no-replace-objects checkout octokit-download npm error error: pathspec 'octokit-download' did not match any file(s) known to git npm error A complete log of this run can be found in: /home/vincentb/.npm/_logs/2025-06-30T05_33_20_198Z-debug-0.log

@theoludwig
Copy link
Member

Well, we can release a beta if needed. First we need to update betawith master at least, and then merge this branch in the beta branch, then it will automatically release a new beta version on npm to try. If everything is good, then we can merge back beta in main and it will release it as stable.

@klaernie

@theoludwig
Copy link
Member

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.

@theoludwig theoludwig merged commit 1304f6d into master Jul 16, 2025
5 checks passed
@theoludwig theoludwig deleted the octokit-download branch July 16, 2025 19:26
@github-actions
Copy link

🎉 This PR is included in version 6.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement] Unreliable CI because of GitHub Rate Limiting

4 participants