Skip to content
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: Asset uploads fail if >30 assets #1 #2

Merged
merged 2 commits into from
Jul 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/main.js

Large diffs are not rendered by default.

10 changes: 2 additions & 8 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class Connection {
}

if (shouldDelete) {
core.startGroup('Deleting old release asset id ' + asset.id + '...');
core.startGroup('Deleting old release asset ' + asset.name + ' (' + asset.id + ')...');
await this.github.rest.repos.deleteReleaseAsset(
{
...context.repo,
Expand Down Expand Up @@ -238,17 +238,11 @@ class Connection {
if (this.id < 0)
return;

let assets = [];

let response = await this.github.paginate(this.github.rest.repos.listReleaseAssets, {
let assets = await this.github.paginate(this.github.rest.repos.listReleaseAssets, {
...context.repo,
release_id: this.id,
});

for(let asset of response){
assets.push(asset);
}

this.dump('assets', assets);
core.endGroup();
return assets;
Expand Down