-
Type:
Suggestion
-
Resolution: Unresolved
-
None
-
Component/s: API - REST
-
None
Issue Summary
The current capabilities of the Export feature do not offer the ability to export just a repository while excluding the fork tree. As soon as you select one repository of a fork hierarchy, then every repository of that fork hierarchy will be exported, including personal forks and origins of the repository.
Steps to Reproduce
- Create a fork repository for parent repository
- Execute an export rest endpoint to export only parent or child repository
curl -u admin -s -n -X POST -H 'Content-type: application/json' -d '{"repositoriesRequest":{"includes":[{"projectKey":"TES","slug":"repoA"}]}}' https://linux-128663.prod.atl-cd.net/bitbucket/rest/api/1.0/migration/exports
- The entire fork hierarchy is added to the export
2026-07-15 02:00:24,352 DEBUG [http-nio-7990-exec-5] @50LRQ1x120x221x0 10.224.56.123,172.50.0.2 "POST /rest/api/1.0/migration/exports HTTP/1.1" c.a.s.i.a.DefaultAuthenticationService admin: Authenticator 'com.atlassian.bitbucket.server.bitbucket-authentication:crowdHttpAuthHandler' authenticated admin (1) 2026-07-15 02:00:24,673 DEBUG [dc-migration:thread-1] admin @50LRQ1x120x221x0 10.224.56.123,172.50.0.2 "POST /rest/api/1.0/migration/exports HTTP/1.1" c.a.s.i.m.ExportScopeResolver Processing repository: 13 for dependency ordering seen repositoryIds: [] 2026-07-15 02:00:24,673 DEBUG [dc-migration:thread-1] admin @50LRQ1x120x221x0 10.224.56.123,172.50.0.2 "POST /rest/api/1.0/migration/exports HTTP/1.1" c.a.s.i.m.ExportScopeResolver Generated dependency chain: [RepositoryScope{repository=TES/repoa[13]}] 2026-07-15 02:00:24,673 DEBUG [dc-migration:thread-1] admin @50LRQ1x120x221x0 10.224.56.123,172.50.0.2 "POST /rest/api/1.0/migration/exports HTTP/1.1" c.a.s.i.m.ExportScopeResolver Processing repository: 14 for dependency ordering seen repositoryIds: [13] 2026-07-15 02:00:24,673 DEBUG [dc-migration:thread-1] admin @50LRQ1x120x221x0 10.224.56.123,172.50.0.2 "POST /rest/api/1.0/migration/exports HTTP/1.1" c.a.s.i.m.ExportScopeResolver Generated dependency chain: [RepositoryScope{repository=~ADMIN/repoa-fork[14]}] 2026-07-15 02:00:24,697 INFO [dc-migration:thread-1] admin @50LRQ1x120x221x0 10.224.56.123,172.50.0.2 "POST /rest/api/1.0/migration/exports HTTP/1.1" c.a.s.i.m.DefaultExportService Export job '1' has started. 2026-07-15 02:00:24,713 DEBUG [dc-migration:thread-1] admin @50LRQ1x120x221x0 10.224.56.123,172.50.0.2 "POST /rest/api/1.0/migration/exports HTTP/1.1" c.a.s.i.m.InstanceDetailsExporter Writing instance details: InstanceDetailsMetadata{Bitbucket Data Center, 9.4.21, buildVersion=9004021, archiveVersion=2, dataCenter=true, instanceName=Bitbucket, nodeId=2cc894a9-58b8-42d2-a830-0bbccee66cb8} 2026-07-15 02:00:24,754 DEBUG [dc-migration:thread-1] admin @50LRQ1x120x221x0 10.224.56.123,172.50.0.2 "POST /rest/api/1.0/migration/exports HTTP/1.1" c.a.s.i.m.ExportScopeResolver Processing repository: 13 for dependency ordering seen repositoryIds: [] 2026-07-15 02:00:24,754 DEBUG [dc-migration:thread-1] admin @50LRQ1x120x221x0 10.224.56.123,172.50.0.2 "POST /rest/api/1.0/migration/exports HTTP/1.1" c.a.s.i.m.ExportScopeResolver Generated dependency chain: [RepositoryScope{repository=TES/repoa[13]}] 2026-07-15 02:00:24,754 DEBUG [dc-migration:thread-1] admin @50LRQ1x120x221x0 10.224.56.123,172.50.0.2 "POST /rest/api/1.0/migration/exports HTTP/1.1" c.a.s.i.m.ExportScopeResolver Processing repository: 14 for dependency ordering seen repositoryIds: [13] 2026-07-15 02:00:24,754 DEBUG [dc-migration:thread-1] admin @50LRQ1x120x221x0 10.224.56.123,172.50.0.2 "POST /rest/api/1.0/migration/exports HTTP/1.1" c.a.s.i.m.ExportScopeResolver Generated dependency chain: [RepositoryScope{repository=~ADMIN/repoa-fork[14]}] 2026-07-15 02:00:25,026 INFO [dc-migration:thread-1] admin @50LRQ1x120x221x0 10.224.56.123,172.50.0.2 "POST /rest/api/1.0/migration/exports HTTP/1.1" c.a.s.i.m.DefaultExportService Export job '1' has completed successfully.
Expected Results
The endpoint should be able to export a single repository (parent or child) out of fork hierarchy
Actual Results
Entire Fork hierarchy is added by the export job
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available