You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2022/08/01 13:01:29 UTC

[incubator-devlake] 02/02: fix: fix github.ExtractApiEvents panic

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

abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit 8b0541777b091655baba1a9039bf712fcb0ce864
Author: zhangliang <li...@merico.dev>
AuthorDate: Mon Aug 1 20:49:01 2022 +0800

    fix: fix github.ExtractApiEvents panic
---
 plugins/github/tasks/event_extractor.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/github/tasks/event_extractor.go b/plugins/github/tasks/event_extractor.go
index c3fd6e69..8d87c2db 100644
--- a/plugins/github/tasks/event_extractor.go
+++ b/plugins/github/tasks/event_extractor.go
@@ -63,7 +63,7 @@ func ExtractApiEvents(taskCtx core.SubTaskContext) error {
 				return nil, err
 			}
 			results := make([]interface{}, 0, 1)
-			if body.GithubId == 0 {
+			if body.GithubId == 0 || body.Actor == nil {
 				return nil, nil
 			}
 			githubIssueEvent, err := convertGithubEvent(body, data.Options.ConnectionId)