From 7985e8de63083827af10d523cd53c145ffd2dec7 Mon Sep 17 00:00:00 2001 From: phips28 Date: Thu, 20 May 2021 23:41:12 +0200 Subject: [PATCH] case: if default=prerelease, but rc-wording is also set then unset it and do not run, when no rc words found in message --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index f5198c6..e9b06de 100644 --- a/index.js +++ b/index.js @@ -66,6 +66,12 @@ Toolkit.run(async (tools) => { } } + // case: if default=prerelease, but rc-wording is also set + // then unset it and do not run, when no rc words found in message + if (version === 'prerelease' && !messages.some((message) => preReleaseWords.some((word) => message.includes(word)))) { + version = null; + } + if (version === 'prerelease' && preid) { version = `${version} --preid=${preid}`; }