reformat
This commit is contained in:
parent
f89fbceca4
commit
4a6678f279
14
index.js
14
index.js
|
@ -31,7 +31,7 @@ Toolkit.run(async tools => {
|
||||||
const patchWords = process.env['INPUT_PATCH-WORDING'].split(',')
|
const patchWords = process.env['INPUT_PATCH-WORDING'].split(',')
|
||||||
const preReleaseWords = process.env['INPUT_RC-WORDING'].split(',')
|
const preReleaseWords = process.env['INPUT_RC-WORDING'].split(',')
|
||||||
|
|
||||||
let version = process.env['INPUT_DEFAULT'] || 'patch'
|
let version = process.env.INPUT_DEFAULT || 'patch'
|
||||||
let foundWord = null
|
let foundWord = null
|
||||||
|
|
||||||
if (messages.some(
|
if (messages.some(
|
||||||
|
@ -40,13 +40,13 @@ Toolkit.run(async tools => {
|
||||||
} else if (messages.some(message => minorWords.some(word => message.includes(word)))) {
|
} else if (messages.some(message => minorWords.some(word => message.includes(word)))) {
|
||||||
version = 'minor'
|
version = 'minor'
|
||||||
} else if (messages.some(message => preReleaseWords.some(word => {
|
} else if (messages.some(message => preReleaseWords.some(word => {
|
||||||
if (message.includes(word)) {
|
if (message.includes(word)) {
|
||||||
foundWord = word
|
foundWord = word
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
))) {
|
))) {
|
||||||
const preid = foundWord.split('-')[1]
|
const preid = foundWord.split('-')[1]
|
||||||
version = `prerelease --preid=${preid}`
|
version = `prerelease --preid=${preid}`
|
||||||
|
|
Loading…
Reference in New Issue