From 1cb0eedfeaad4e66ebe026bc009516022502875a Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Wed, 19 Oct 2022 21:10:24 +0800 Subject: [PATCH] fix: body null (#123) * fix: body null * docs: update changelog --- CHANGELOG.md | 6 ++++++ action.yml | 2 +- dist/index.js | 2 +- src/util/index.ts | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fa23bf..2d9c15b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ 🛠 refactor --> +## v3.3.1 + +`2022.10.19` + +- 🐞 fix: body null case. [#123](https://github.com/actions-cool/issues-helper/pull/123) + ## v3.3.0 `2022.09.02` diff --git a/action.yml b/action.yml index 8330515..60bd27a 100644 --- a/action.yml +++ b/action.yml @@ -117,5 +117,5 @@ outputs: description: 'Check issue' runs: - using: node12 + using: node16 main: 'dist/index.js' diff --git a/dist/index.js b/dist/index.js index d5117e2..d84c8ec 100644 --- a/dist/index.js +++ b/dist/index.js @@ -15973,7 +15973,7 @@ const dealRandomAssignees = (assignees, randomTo) => { return arr; }; exports.dealRandomAssignees = dealRandomAssignees; -const matchKeyword = (content, keywords) => { +const matchKeyword = (content = '', keywords) => { return !!keywords.find(item => content.toLowerCase().includes(item)); }; exports.matchKeyword = matchKeyword; diff --git a/src/util/index.ts b/src/util/index.ts index 3b07b64..4f9b30c 100644 --- a/src/util/index.ts +++ b/src/util/index.ts @@ -9,7 +9,7 @@ export const dealRandomAssignees = (assignees: string, randomTo: string | void): return arr; }; -export const matchKeyword = (content: string, keywords: string[]): boolean => { +export const matchKeyword = (content: string = '', keywords: string[]): boolean => { return !!keywords.find(item => content.toLowerCase().includes(item)); };