warren830 commented on code in PR #3853:
URL: 
https://github.com/apache/incubator-devlake/pull/3853#discussion_r1039318938


##########
plugins/github/api/scope.go:
##########
@@ -137,7 +142,28 @@ func GetScopeList(input *core.ApiResourceInput) 
(*core.ApiResourceOutput, errors
        if err != nil {
                return nil, err
        }
-       return &core.ApiResourceOutput{Body: repos, Status: http.StatusOK}, nil
+       var ruleIds []uint64
+       for _, repo := range repos {
+               if repo.TransformationRuleId > 0 {
+                       ruleIds = append(ruleIds, repo.TransformationRuleId)
+               }
+       }
+       var rules []models.GithubTransformationRule
+       if len(ruleIds) > 0 {
+               err = basicRes.GetDal().All(&rules, dal.Where("id IN (?)", 
ruleIds))

Review Comment:
   Can we use a left join to get repo&ruleName together?



-- 
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