From f89fbceca40c8a0a86c8e0aea0e89d2763371780 Mon Sep 17 00:00:00 2001 From: phips28 Date: Mon, 16 Nov 2020 20:25:09 +0100 Subject: [PATCH] reformat --- index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index 39c6e29..81ea787 100644 --- a/index.js +++ b/index.js @@ -19,7 +19,7 @@ Toolkit.run(async tools => { const messages = event.commits ? event.commits.map(commit => commit.message + '\n' + commit.body) : [] const commitMessage = 'version bump to' - console.log('messages:', messages); + console.log('messages:', messages) const isVersionBump = messages.map(message => message.toLowerCase().includes(commitMessage)).includes(true) if (isVersionBump) { tools.exit.success('No action necessary!') @@ -32,7 +32,7 @@ Toolkit.run(async tools => { const preReleaseWords = process.env['INPUT_RC-WORDING'].split(',') let version = process.env['INPUT_DEFAULT'] || 'patch' - let foundWord = null; + let foundWord = null if (messages.some( message => /^([a-zA-Z]+)(\(.+\))?(\!)\:/.test(message) || majorWords.some(word => message.includes(word)))) { @@ -41,15 +41,15 @@ Toolkit.run(async tools => { version = 'minor' } else if (messages.some(message => preReleaseWords.some(word => { if (message.includes(word)) { - foundWord = word; - return true; + foundWord = word + return true } else { - return false; + return false } } ))) { - const preid = foundWord.split("-")[1]; - version = `prerelease --preid=${preid}`; + const preid = foundWord.split('-')[1] + version = `prerelease --preid=${preid}` } else if (patchWords && Array.isArray(patchWords)) { if (!messages.some(message => patchWords.some(word => message.includes(word)))) { version = null