This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts-bot.git


The following commit(s) were added to refs/heads/master by this push:
     new 704063c  fix wakeup script
704063c is described below

commit 704063c905f68fd5537a975618dbb32009e15400
Author: plainheart <[email protected]>
AuthorDate: Mon Dec 5 17:14:18 2022 +0800

    fix wakeup script
---
 src/glitch/wakeup.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/glitch/wakeup.js b/src/glitch/wakeup.js
index 839c604..aca6343 100644
--- a/src/glitch/wakeup.js
+++ b/src/glitch/wakeup.js
@@ -3,12 +3,12 @@ const fetch = require('node-fetch');
 const WAKEUP_URL = 'https://apache-incubator-echarts-bot-1.glitch.me/probot';
 
 (async function() {
-  const { body } = await fetch(WAKEUP_URL, {
+  const body = await fetch(WAKEUP_URL, {
     headers: {
       'Accept': 'text/html',
       'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) 
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36'
     }
-  });
+  }).then(res => res.text());
   if (body.indexOf('Welcome to') === -1) {
     console.log('Response body:\n', body);
     throw new Error('bot may not be working.');


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to