提交 25c43a28 编写于 作者: sinat_25235033's avatar sinat_25235033

fix Can not detect the comment body

上级 af443409
此差异由.gitattributes 抑制。
此差异由.gitattributes 抑制。
......@@ -72,7 +72,8 @@ function detectIsEnglish(body: string): boolean | true {
const lngDetector = new LanguageDetect()
const detectResult = lngDetector.detect(body, 1)
if (detectResult === undefined || detectResult === null || detectResult.length !== 1) {
core.setFailed(`Can not detect the comment body: ${body}`)
core.warning(`Can not detect the comment body: ${body}`)
return false
}
core.info(`Detect comment body language result is: ${detectResult[0][0]}, similar sorce: ${detectResult[0][1]}`)
return detectResult.length === 1 && detectResult[0][0] === 'english'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册