likyh commented on code in PR #4491:
URL: 
https://github.com/apache/incubator-devlake/pull/4491#discussion_r1115272064


##########
backend/plugins/github_graphql/tasks/issue_collector.go:
##########
@@ -130,7 +137,8 @@ func CollectIssue(taskCtx plugin.SubTaskContext) 
errors.Error {
                        results := make([]interface{}, 0, 1)
                        isFinish := false
                        for _, issue := range issues {
-                               if data.TimeAfter != nil && 
!data.TimeAfter.Before(issue.CreatedAt) {
+                               // collect all data even though in increment 
mode because of existing data extracting
+                               if collectorWithState.TimeAfter != nil && 
!collectorWithState.TimeAfter.Before(issue.UpdatedAt) {

Review Comment:
   No, this ResponseParser used both new data and existing data. So if `break` 
when `LastUpdated.Before(issue.UpdatedAt)`, the existing data will not be 
dealed.



##########
backend/plugins/github_graphql/tasks/check_run_collector.go:
##########
@@ -101,7 +101,7 @@ func CollectCheckRun(taskCtx plugin.SubTaskContext) 
errors.Error {
        db := taskCtx.GetDal()
        data := taskCtx.GetData().(*githubTasks.GithubTaskData)
 
-       collectorWithState, err := 
helper.NewApiCollectorWithState(helper.RawDataSubTaskArgs{

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to