From dbf39fd4a7d02bf1770d0c028892972a5dd95753 Mon Sep 17 00:00:00 2001 From: Kuitos Date: Mon, 6 Jul 2020 00:58:55 +0800 Subject: [PATCH] fix: parse body not make sense and it would cause JSON parse error --- src/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 85cd41c..506632d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,7 +10,6 @@ async function run(): Promise { const secretStr = core.getInput('secret') const ignoreError = core.getInput('ignoreError') === 'true' const secret = secretStr === '' ? undefined : secretStr - const data = JSON.parse(body) if (secret) { core.info('get secret, sign mode') } @@ -22,7 +21,7 @@ async function run(): Promise { }) try { - const resp = await dingBot.rawSend(data) + const resp = await dingBot.rawSend(body) if (resp?.errcode !== 0) { if (ignoreError) {