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 6fc5e8b  use node-fetch to wake up
6fc5e8b is described below

commit 6fc5e8b256285354966860342ed275dea4323cea
Author: plainheart <[email protected]>
AuthorDate: Mon Dec 5 17:10:11 2022 +0800

    use node-fetch to wake up
---
 .github/workflows/bot-wakup.yml | 2 +-
 src/glitch/wakeup.js            | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/bot-wakup.yml b/.github/workflows/bot-wakup.yml
index cad125a..10f9bd4 100644
--- a/.github/workflows/bot-wakup.yml
+++ b/.github/workflows/bot-wakup.yml
@@ -11,7 +11,7 @@ jobs:
 
     strategy:
       matrix:
-        node-version: ['12.x']
+        node-version: ['16.x']
 
     steps:
       - uses: actions/checkout@v3
diff --git a/src/glitch/wakeup.js b/src/glitch/wakeup.js
index 2cbd0af..839c604 100644
--- a/src/glitch/wakeup.js
+++ b/src/glitch/wakeup.js
@@ -1,12 +1,12 @@
-const got = require('got');
+const fetch = require('node-fetch');
 
 const WAKEUP_URL = 'https://apache-incubator-echarts-bot-1.glitch.me/probot';
 
 (async function() {
-  const { body } = await got(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/101.0.4951.41 Safari/537.36'
+      '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'
     }
   });
   if (body.indexOf('Welcome to') === -1) {


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

Reply via email to