diff --git a/dist/index.js b/dist/index.js index 97e5bf9a9227f41cddc1da8ce50cae44e015e746..8d9e388c3484b87bc5d00afbb05bbb020d5e78c2 100644 Binary files a/dist/index.js and b/dist/index.js differ diff --git a/dist/index.js.map b/dist/index.js.map index dcd135db4a0b20bc16d1bf8010c0883d878194da..692edb1d6462b8fe4a0c1393df67128ef1819c37 100644 Binary files a/dist/index.js.map and b/dist/index.js.map differ diff --git a/src/main.ts b/src/main.ts index 34929acc1e4b770b1d234df4f8311ad2ef1be1a0..a005d7be7bf1ceaa84263a7d3c6de783162e124f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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'