fix: 🐛 typos

keyworld => keyword

re #14
This commit is contained in:
bubkoo 2021-01-22 09:14:37 +08:00
parent e0aa68fcba
commit 393ab50fe8
3 changed files with 5 additions and 5 deletions

View File

@ -22,7 +22,7 @@ jobs:
# Any matched issue will stop detection immediately.
# You can specify multi filters in each line.
filter: ''
# Exclude keyworlds in title before detecting.
# Exclude keywords in title before detecting.
exclude: ''
# Label to set, when potential duplicates are detected.
label: potential-duplicate

View File

@ -9,7 +9,7 @@ inputs:
description: Filter issues by title.
required: false
exclude:
description: Exclude keyworlds in title before detecting.
description: Exclude keywords in title before detecting.
required: false
label:
description: Label to set, when potential duplicates are detected.

View File

@ -42,9 +42,9 @@ export namespace Util {
if (exclude) {
return exclude
.split(/[\s\n]+/)
.map((keyworld) => keyworld.trim())
.filter((keyworld) => keyworld.length > 0)
.reduce((memo, keyworld) => memo.replace(keyworld, ''), title)
.map((keyword) => keyword.trim())
.filter((keyword) => keyword.length > 0)
.reduce((memo, keyword) => memo.replace(keyword, ''), title)
.replace(/\s+/, ' ')
.trim()
}