-
Notifications
You must be signed in to change notification settings - Fork 3
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
Use v1.3.0 in README examples #1
Conversation
Oh yeah you're right nice catch! Thank you and merging |
Thanks! I'm really finding the project useful. I don't suppose you know what could be causing an issue like I've got about 380 assets on one release that I'm trying to update and while I sometimes run into API rate limits, I'm also getting this Link to my personal fork (so I can add debug lines until I find the issue): https://github.com/beyarkay/update-existing-release Link to the relevant GH action where I use my fork: https://github.com/beyarkay/eskom-calendar/blob/main/.github/workflows/manually_build_calendars.yaml#L32-L40 Link to the GH actions which I've attempted to run, but they're mostly failing (even though they return status code 0): https://github.com/beyarkay/eskom-calendar/actions/workflows/manually_build_calendars.yaml |
From the logs it looks like not all the files are being deleted possibly? I don't know about the state that the release was in when it was run, it might have been that the rest didn't exist, but I have a feeling that not all the files are being deleted correctly. It looks like it deleted up through In the |
I looked into the Github REST api a little more and it is limited so that's probably the issue. It looks like it has two parameters, I've made a change that potentially could fix this. If you try using |
So I've re-run the change with
See the line and workflow here |
So I think I've found the issue. Or at least, I've got some code that works. My JS isn't too fluent (hence lack of a PR), but this script works: const { Octokit } = require("@octokit/rest");
const octokit = new Octokit();
const release_id = 72143886;
octokit.paginate(octokit.rest.repos.listReleaseAssets, {
release_id: release_id,
owner: 'beyarkay',
repo: 'eskom-calendar',
}).then(response => {
assets = [];
for(let asset of response){
assets.push(asset);
}
console.log(assets[0]);
}); So maybe the change needs to be to remove these lines and replace them with: let assets = await octokit.paginate(octokit.rest.repos.listReleaseAssets, {
release_id: release_id,
owner: 'beyarkay',
repo: 'eskom-calendar',
});
assets = [];
for(let asset of response){
assets.push(asset);
} with the appropriate changes to remove the |
What a beautiful green tick: https://github.com/beyarkay/eskom-calendar/runs/7397094554?check_suite_focus=true It seems like the changes I made worked. Sending a PR through now. |
Fix: Asset uploads fail if >30 assets #1
Thanks for the action!
I got stuck for a while because I copy-pasted the v1.2.0 tag from the readme examples. This PR updates those examples to be 1.2