From 6d91d0663849fe653cecdd60fc9260999a3050bb Mon Sep 17 00:00:00 2001 From: Gustavo Parreira Date: Tue, 1 Sep 2020 18:42:25 +0100 Subject: [PATCH] fix: breaking change syntax regex --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index a4f4690..bebe4ab 100644 --- a/index.js +++ b/index.js @@ -26,7 +26,7 @@ Toolkit.run(async tools => { } let version = 'patch' - if (messages.map(message => message.match(/^([a-zA-Z]+)(\(.+\))?(\!)\:/) || message.includes('BREAKING CHANGE') || message.includes('major')).includes(true)) { + if (messages.map(message => /^([a-zA-Z]+)(\(.+\))?(\!)\:/.test(message) || message.includes('BREAKING CHANGE') || message.includes('major')).includes(true)) { version = 'major' } else if (messages.map( message => message.toLowerCase().startsWith('feat') || message.toLowerCase().includes('minor')).includes(true)) {