You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "spiffaz (via GitHub)" <gi...@apache.org> on 2026/03/03 10:49:53 UTC

[PR] fix(bitbucket): default empty entities to all domain types in makeScopesV200 [incubator-devlake]

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

   ## Summary
   
   - When `scopeConfig.Entities` is empty (common when no entities are explicitly selected in the UI), `makeScopesV200` produced zero scopes, leaving `project_mapping` with no repo rows
   - Adds the same empty-entities default applied to GitLab in #8743
   - Adds unit tests for normal entities, empty entities, and CROSS entity scenarios
   
   ## How has this been tested?
   
   ```bash
   docker run --rm -v $(pwd):/app -w /app/backend mericodev/lake-builder:latest \
     bash -c "go test ./plugins/bitbucket/api/ -v -run TestMakeScopes"
   ```
   
   All 3 tests pass:
   - `TestMakeScopes` - CODE + TICKET + CICD = 3 scopes
   - `TestMakeScopesWithEmptyEntities` - empty entities defaults to all domain types = 3 scopes
   - `TestMakeScopesWithCrossEntity` - CROSS + TICKET = 2 scopes (repos + boards)
   
   ## What is the fix?
   
   After generating the domain ID, default empty entities to `plugin.DOMAIN_TYPES`:
   
   ```go
   if len(scopeConfig.Entities) == 0 {
       scopeConfig.Entities = plugin.DOMAIN_TYPES
   }
   ```
   
   Bitbucket Cloud already had `DOMAIN_TYPE_CROSS` in the repo scope condition (unlike GitLab before #8743), so only the empty-entities default was needed.
   
   Closes #8748


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(bitbucket): default empty entities to all domain types in makeScopesV200 [incubator-devlake]

Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh merged PR #8750:
URL: https://github.com/apache/incubator-devlake/pull/8750


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org