You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2021/03/15 00:26:59 UTC

[echarts-bot] branch master updated: fix: fix an error in `isFirstTimeContributor` function.

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 dc9aa22  fix: fix an error in `isFirstTimeContributor` function.
dc9aa22 is described below

commit dc9aa22e7b31db032c56bfe495f55e462644d3a8
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Mon Mar 15 08:26:08 2021 +0800

    fix: fix an error in `isFirstTimeContributor` function.
---
 index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 4dfccdd..dbf2913 100644
--- a/index.js
+++ b/index.js
@@ -277,7 +277,7 @@ async function isFirstTimeContributor(context) {
                 creator: context.payload.pull_request.user.login
             })
         );
-        return response.data.filter(data => data.pull_request) === 1;
+        return response.data.filter(data => data.pull_request).length === 1;
     }
     catch (e) {
         logger.error('failed to check first-time contributor');


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org