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 f1f092b4898a77e3099bca1417646255f9f669c6
Author: zhangliang <[email protected]>
AuthorDate: Mon Aug 1 20:30:19 2022 +0800

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

diff --git a/plugins/github/tasks/pr_review_extractor.go 
b/plugins/github/tasks/pr_review_extractor.go
index aed145d4..f994a0e0 100644
--- a/plugins/github/tasks/pr_review_extractor.go
+++ b/plugins/github/tasks/pr_review_extractor.go
@@ -71,7 +71,7 @@ func ExtractApiPullRequestReviews(taskCtx 
core.SubTaskContext) error {
                        if err != nil {
                                return nil, err
                        }
-                       if apiPullRequestReview.State == "PENDING" {
+                       if apiPullRequestReview.State == "PENDING" || 
apiPullRequestReview.User == nil {
                                return nil, nil
                        }
                        pull := &SimplePr{}

Reply via email to