spiffaz opened a new pull request, #8743:
URL: https://github.com/apache/incubator-devlake/pull/8743

   ## Summary
   - GitLab's `makeScopeV200` did not create a `repos` scope when 
`scopeConfig.Entities` was empty or only contained `CROSS`, causing 
`project_mapping` to have no `table='repos'` row
   - This broke downstream DORA metrics, PR-issue linking, and all Grafana PR 
dashboard panels that join on `project_mapping` with `table='repos'`
   - The fix aligns GitLab with the GitHub plugin's `makeScopesV200` (lines 
155-160) by:
     1. Defaulting empty entities to `plugin.DOMAIN_TYPES`
     2. Adding `DOMAIN_TYPE_CROSS` to the repo scope condition
   
   Closes #8742
   
   ## Changes
   - `backend/plugins/gitlab/api/blueprint_v200.go` - two-line fix in 
`makeScopeV200`
   - `backend/plugins/gitlab/api/blueprint_V200_test.go` - two new test cases:
     - `TestMakeScopesWithEmptyEntities` - verifies empty entities default to 
all domain types
     - `TestMakeScopesWithCrossEntity` - verifies CROSS entity triggers repo 
scope creation
   
   ## Test plan
   - [x] All existing tests pass (`TestMakeScopes`, 
`TestMakeDataSourcePipelinePlanV200`)
   - [x] New tests pass for both empty entities and CROSS entity scenarios
   - [x] Tests verified in `mericodev/lake-builder:latest` Docker container 
(same as CI)
   
   ## Note
   The same issue also affects Bitbucket (missing empty default) and Azure 
DevOps (missing both). If this fix is accepted, I am happy to submit follow-up 
PRs for those plugins.


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