From b797010cb9678cccee01953f5c5db23a8e43d0bf Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sat, 18 May 2024 22:00:03 -0400 Subject: [PATCH 1/2] fix: remove has assets condition --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 0ef297d..f7f0e9f 100644 --- a/index.js +++ b/index.js @@ -126,15 +126,15 @@ async function deleteOlderReleases(keepLatest, keepMinDownloadCount, deleteExpir const activeMatchedReleases = data.filter((item) => { if (deletePrereleaseOnly) { if (deletePatternStr) { - return !item.draft && item.assets.length > 0 && item.prerelease && item.tag_name.match(deletePattern); + return !item.draft && item.prerelease && item.tag_name.match(deletePattern); } else { - return !item.draft && item.assets.length > 0 && item.prerelease; + return !item.draft && item.prerelease; } } else { if (deletePatternStr) { - return !item.draft && item.assets.length > 0 && item.tag_name.match(deletePattern); + return !item.draft && item.tag_name.match(deletePattern); } else { - return !item.draft && item.assets.length > 0; + return !item.draft; } } }) From 7aee8e4665b7308e38b988f3d52ff4be14d514d3 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sun, 19 May 2024 10:56:20 -0400 Subject: [PATCH 2/2] Update README.md --- README.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 794f7d6..daa8c12 100644 --- a/README.md +++ b/README.md @@ -90,12 +90,11 @@ flowchart TD 02[Get github all releases] 03[Filter pre-release data] 04[Filter delete_tag_pattern] -05[Filter assets length > 0] -06[Sort data by date] -07[Filter keep latest] -08[Filter keep keepMinDownloadCount] -09[Filter deleteExpiredData] -10[Delete old release and tag] +05[Sort data by date] +06[Filter keep latest] +07[Filter keep keepMinDownloadCount] +08[Filter deleteExpiredData] +09[Delete old release and tag] 01 --> 02 02 -.-> 03 @@ -103,9 +102,8 @@ flowchart TD 03 --> 05 04 --> 05 05 --> 06 - 06 --> 07 - 07 -.-> 08 - 07 -.-> 09 - 09 --> 10 - 08 --> 10 + 06 -.-> 07 + 06 -.-> 08 + 07 --> 09 + 08 --> 09 ```