Merge pull request #35 from Gustash/master

fix: `!` breaking change syntax regex
This commit is contained in:
Phil 2020-09-01 19:53:48 +02:00 committed by GitHub
commit aa86498548
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ Toolkit.run(async tools => {
} }
let version = 'patch' 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' version = 'major'
} else if (messages.map( } else if (messages.map(
message => message.toLowerCase().startsWith('feat') || message.toLowerCase().includes('minor')).includes(true)) { message => message.toLowerCase().startsWith('feat') || message.toLowerCase().includes('minor')).includes(true)) {