spiffaz opened a new issue, #8748:
URL: https://github.com/apache/incubator-devlake/issues/8748

   ## Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-devlake/issues) and found no 
similar issues.
   
   ## What happened
   
   In `backend/plugins/bitbucket/api/blueprint_v200.go`, the `makeScopesV200` 
function does not default `scopeConfig.Entities` to `plugin.DOMAIN_TYPES` when 
entities are empty. This means that when a blueprint is created without 
specifying entities (which is common in the UI), no scopes are generated at 
all, and the `project_mapping` table ends up with no repo rows.
   
   This is the same bug that was fixed for GitLab in #8743 (which fixed #8742). 
While Bitbucket Cloud already has `DOMAIN_TYPE_CROSS` in the repo scope 
condition (unlike GitLab before the fix), it is still missing the 
empty-entities default.
   
   ## What do you expect to happen
   
   When `scopeConfig.Entities` is empty, it should default to 
`plugin.DOMAIN_TYPES` so that all domain scopes (repos, boards, cicd_scope) are 
created in `project_mapping`.
   
   ## How to reproduce
   
   1. Create a Bitbucket Cloud connection and configure a blueprint without 
specifying entities (leave entities empty)
   2. Run the blueprint
   3. Check the `project_mapping` table - no rows are created for this scope
   
   ## Anything else
   
   Follow-up from #8742 / #8743. The fix is to add the same empty-entities 
default that was applied to GitLab.
   
   ## Version
   
   Latest main branch
   
   ## Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!


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