amanpatel commented on issue #4992:
URL: 
https://github.com/apache/incubator-devlake/issues/4992#issuecomment-1521825253

   @mintsweet  Yes
   
   Request URL: 
http://(domain)/api/plugins/gitlab/connections/3/remote-scopes?groupId=5
   
   Response JSON (I have modified it to remove sensitive details). The first 
entry in the "children" array is the one that causes the problem, as it has 
id:5 and parentId of 5 (recursive).
   
   In gitlab the parentID is not the project but a group id. So they are 
allowed to collide...
   
   ```
   {
     "children": [
   
       {
         "type": "scope",
         "parentId": "5",
         "id": "5",
         "name": "Networks API",
         "data": {
           "connectionId": 0,
           "gitlabId": 5,
           "name": "Networks API",
           "description": ".",
           "defaultBranch": "develop",
           "pathWithNamespace": "resonance/networks-api",
           "webUrl": "https://.../resonance/networks-api";,
           "creatorId": 0,
           "visibility": "private",
           "openIssuesCount": 0,
           "starCount": 2,
           "forkedFromProjectId": 0,
           "forkedFromProjectWebUrl": "",
           "httpUrlToRepo": "https://.../resonance/networks-api.git";,
           "createdDate": "2021-06-15T22:12:31.916Z",
           "updatedDate": "2023-04-22T00:25:24.737Z"
         }
       },
       {
         "type": "scope",
         "parentId": "5",
         "id": "4",
         "name": "Networks Frontend",
         "data": {
           "connectionId": 0,
           "gitlabId": 4,
           "name": "Networks Frontend",
           "description": ".",
           "defaultBranch": "develop",
           "pathWithNamespace": "resonance/networks-frontend",
           "webUrl": "https://.../resonance/networks-frontend";,
           "creatorId": 0,
           "visibility": "private",
           "openIssuesCount": 0,
           "starCount": 2,
           "forkedFromProjectId": 0,
           "forkedFromProjectWebUrl": "",
           "httpUrlToRepo": "https://.../resonance/networks-frontend.git";,
           "createdDate": "2021-06-15T22:04:43.105Z",
           "updatedDate": "2023-04-25T01:30:04.915Z"
         }
       }
     ],
     "nextPageToken": ""
   }
   ```
   


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