check if rc wording exists then stop v bump

This commit is contained in:
cmario92 2021-07-01 21:26:14 +03:00
parent 03c10b2a9d
commit 01d8a68811
1 changed files with 5 additions and 3 deletions

View File

@ -73,9 +73,11 @@ Toolkit.run(async (tools) => {
version = 'prerelease'; version = 'prerelease';
} }
// case: if default=prerelease, but rc-wording is also set // case: if default=prerelease,
// then unset it and do not run, when no rc words found in message // rc-wording is also set
if (version === 'prerelease' && !messages.some((message) => preReleaseWords.some((word) => message.includes(word)))) { // and does not include any of rc-wording
// then unset it and do not run
if (version === 'prerelease' && preReleaseWords !== '' && !messages.some((message) => preReleaseWords.some((word) => message.includes(word)))) {
version = null; version = null;
} }