commit
f0f88bf408
6
index.js
6
index.js
|
@ -28,8 +28,10 @@ Toolkit.run(async tools => {
|
|||
|
||||
const majorWords = process.env['INPUT_MAJOR-WORDING'].split(',')
|
||||
const minorWords = process.env['INPUT_MINOR-WORDING'].split(',')
|
||||
const patchWords = process.env['INPUT_PATCH-WORDING'].split(',')
|
||||
const preReleaseWords = process.env['INPUT_RC-WORDING'].split(',')
|
||||
|
||||
// if patch words aren't specified, any commit message qualifies as a patch
|
||||
const patchWords = process.env['INPUT_PATCH-WORDING'] ? process.env['INPUT_PATCH-WORDING'].split(',') : null
|
||||
|
||||
let version = process.env.INPUT_DEFAULT || 'patch'
|
||||
let foundWord = null
|
||||
|
@ -50,7 +52,7 @@ Toolkit.run(async tools => {
|
|||
))) {
|
||||
const preid = foundWord.split('-')[1]
|
||||
version = `prerelease --preid=${preid}`
|
||||
} else if (patchWords && Array.isArray(patchWords) && patchWords.length) {
|
||||
} else if (Array.isArray(patchWords) && patchWords.length) {
|
||||
if (!messages.some(message => patchWords.some(word => message.includes(word)))) {
|
||||
version = null
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue