Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jay2610 committed Dec 12, 2022
1 parent 7236796 commit 03d04cd
Show file tree
Hide file tree
Showing 1,038 changed files with 7 additions and 231,057 deletions.
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ if (deletePattern) {
console.log(`releases containing ${deletePattern} will be targeted`);
}

let delete_type = process.env.INPUT_DELETE_TYPE || "release";
console.log(`${delete_type} will be targeted`);


const commonOpts = {
host: "api.github.com",
Expand Down Expand Up @@ -94,6 +97,10 @@ async function deleteOlderReleases(keepLatest) {
const activeMatchedReleases = data.filter(
({ draft, tag_name, prerelease, target_commitish }) => !draft
&& tag_name.indexOf(deletePattern) !== -1
&& (
(delete_type === 'release' && prerelease === false)
|| (delete_type === 'prerelease' && prerelease === true)
)
);

if (activeMatchedReleases.length === 0) {
Expand Down
1 change: 0 additions & 1 deletion node_modules/.bin/semver

This file was deleted.

Loading

0 comments on commit 03d04cd

Please sign in to comment.