keon94 commented on code in PR #5153:
URL:
https://github.com/apache/incubator-devlake/pull/5153#discussion_r1191246744
##########
backend/helpers/pluginhelper/api/scope_helper.go:
##########
@@ -207,24 +243,53 @@ func (c *ScopeApiHelper[Conn, Scope, Tr])
GetScopeList(input *plugin.ApiResource
if err != nil {
return nil, err
}
+ if params.loadBlueprints {
+ if len(scopeIdFieldName) == 0 {
+ return nil, errors.Default.New("scope Id field name is
not known") //temporary, limited solution until I properly refactor all of this
in another PR
+ }
+ scopesById := c.mapByScopeId(apiScopes, scopeIdFieldName[0])
+ var scopeIds []string
+ for id := range scopesById {
+ scopeIds = append(scopeIds, id)
+ }
+ blueprintMap, err :=
c.bpManager.GetBlueprintsByScopes(scopeIds...)
Review Comment:
Should it filter by bother connectionId and scopeId? Right now it only does
based on scopeId
--
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]