Filter out empty strings for major/minor bump checks

This commit is contained in:
Tim Robinson 2023-06-07 16:47:41 +10:00
parent ab013097e0
commit 67ae6a8354
1 changed files with 2 additions and 2 deletions

View File

@ -71,8 +71,8 @@ const pkg = getPackageJson();
}
// input wordings for MAJOR, MINOR, PATCH, PRE-RELEASE
const majorWords = process.env['INPUT_MAJOR-WORDING'].split(',');
const minorWords = process.env['INPUT_MINOR-WORDING'].split(',');
const majorWords = process.env['INPUT_MAJOR-WORDING'].split(',').filter((word) => word != '');
const minorWords = process.env['INPUT_MINOR-WORDING'].split(',').filter((word) => word != '');
// patch is by default empty, and '' would always be true in the includes(''), thats why we handle it separately
const patchWords = process.env['INPUT_PATCH-WORDING'] ? process.env['INPUT_PATCH-WORDING'].split(',') : null;
const preReleaseWords = process.env['INPUT_RC-WORDING'] ? process.env['INPUT_RC-WORDING'].split(',') : null;