You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug][Bitbucket] project_mapping missing repos scope when entities empty #8748
I had searched in the 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
Create a Bitbucket Cloud connection and configure a blueprint without specifying entities (leave entities empty)
Run the blueprint
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.
Thanks for the detailed bug report! Your analysis is correct. Looking at the Bitbucket makeScopesV200 function, when scopeConfig.Entities is empty, none of the StringsContains checks pass, so no scopes get added.
Activity
dosubot commentedon Mar 3, 2026
Thanks for the detailed bug report! Your analysis is correct. Looking at the Bitbucket
makeScopesV200function, whenscopeConfig.Entitiesis empty, none of theStringsContainschecks pass, so no scopes get added.The fix should be the same pattern used in the GitLab fix (#8743) and GitHub's implementation — add this at the start of the loop in
makeScopesV200:As you noted, Bitbucket already has
DOMAIN_TYPE_CROSSin its repo scope condition, so only the empty entities defaulting logic is needed.For reference, Azure DevOps has the same issue tracked in #8749.
To reply, just mention @dosu.
Docs are dead. Just use Dosu.
fix(bitbucket): default empty entities to all domain types in makeSco…
fix(bitbucket): default empty entities to all domain types in makeSco…
fix(bitbucket): default empty entities to all domain types in makeSco…
feat: GitHub App token refresh (#8746)
fix(bitbucket): default empty entities to all domain types in makeSco…
feat: GitHub App token refresh (apache#8746)
fix(bitbucket): default empty entities to all domain types in makeSco…
feat: GitHub App token refresh (apache#8746)
fix(bitbucket): default empty entities to all domain types in makeSco…
fix: Copilot plugin - add backfill time window to ensure data consist…
Sync upstream Apache DevLake (v1.0.3-beta9 → beta15) (#22)