Skip to content

Commit

Permalink
Merge pull request #2 from beyarkay/fix-asset-uploads
Browse files Browse the repository at this point in the history
Fix: Asset uploads fail if >30 assets #1
  • Loading branch information
IsaacShelton authored Jul 18, 2022
2 parents 4881928 + ddf6001 commit 3d526d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
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

0 comments on commit 3d526d3

Please sign in to comment.