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

zhangliang2022 pushed a commit to branch release-v0.12
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit 2cc654162e6b0fb2e80a6dfb0dff2f68d47d68b0
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