gh-gei icon indicating copy to clipboard operation
gh-gei copied to clipboard

Bitbucket cloud importing

Open calebAtIspot opened this issue 8 months ago • 4 comments

Description

We are investigating the possibility of migrating hundreds of Bitbucket cloud repos to Github. I saw that you have a bitbucket server importer, so I'm wondering why not a bitbucket cloud importer? They are pretty similar right? I'm curious if you already tried to do a cloud importer and ran into an issue.

I'm also wondering if you're open to a PR adding cloud importing functionality.

Third question, I'm wondering if bitbucket cloud importing would be better off as a separate extension or a refactoring of the current bitbucket extension

calebAtIspot avatar Apr 23 '25 16:04 calebAtIspot

BitBucket Server and BitBucket Cloud are actually significantly different. They started their lives as separate products that were subsequently renamed to BitBucket. The API's are very different. And specifically for the GitHub migration tooling, BitBucket Cloud doesn't support the generation of migration archives which is what the migration process from BBS relies on.

dylan-smith avatar Apr 23 '25 16:04 dylan-smith

Yeah, I was just looking into that and I saw that bitbucket cloud doesn't have a migration endpoint, the API's are different

https://github.com/github/gh-gei/blob/main/src/Octoshift/Services/BbsApi.cs#L59C48-L59C57 https://confluence.atlassian.com/bitbucketserver078/exporting-1037994732.html https://api.bitbucket.org/2.0/migration/exports/preview

Would you be open to a PR adding a bitbucket cloud importer extension?

calebAtIspot avatar Apr 23 '25 17:04 calebAtIspot

👋 @calebAtIspot,

Would you be open to a PR adding a bitbucket cloud importer extension?

It won't work as you expect it to. The gh-gei CLI is basically calling the GEI's backend via GraphQL so in order for it to work it needs to be added to the backend.

ArinGhazarian avatar Apr 23 '25 20:04 ArinGhazarian

Darn, okay. Given that, I've been working on a custom tool for iSpot for migrating Bitbucket cloud. I may be able to open-source it :)

Do you have any advice for how to migrate PR description / comments? I'm currently using the raw text, which works well for the most part, but has a few problems, like mentions come across as @{158e7dde9960983ef6c7037g} instead of the name of the person. Any other general advice would also be appreciated.

calebAtIspot avatar Jun 10 '25 23:06 calebAtIspot

I've open-sourced my Bitbucket cloud migration tool :)

https://github.com/ispot-main/bitbucket-github-migrator

So far we have been using it successfully at iSpot

calebAtIspot avatar Jun 27 '25 04:06 calebAtIspot

iSpot un-opensourced it (not sure why), but luckily I forked it back when it was still public: https://github.com/Almenon/bitbucket-github-migrator

Almenon avatar Jul 24 '25 23:07 Almenon