Migrating from Stash to Bitbucket

We are looking at migrating several Stash respositories into Bitbucket. These repositories have accumulated a healthy number of pull request comments that we would like to bring along as a part of the migration.

Is this possible (and how)?

3 answers

1 accepted

Hi Robert,

I'm afraid not. Obviously importing the Git repositories is easy enough, but we don't have any tooling around migrating the pull request data.

Your best and only bet at the moment would be to use the various REST APIs of both products to recreate the data in some form.

https://confluence.atlassian.com/display/BITBUCKET/pullrequests+Resource

https://developer.atlassian.com/static/rest/stash/latest/stash-rest.html#idm1341440

I'm not going to lie - that could be quite tricky. Some things that come to mind:

1. Recreating the original user - we don't have a sudo REST endpoint. If that is important I might suggest writing a simple plugin with an http filter that lets you impersonate a given user.

2. To create a pull request for a branch that has already been merged you would probably have to create 2 temporary branches in Stash on the commits prior to the PR merge. You could then attach the relevant comments, and then either move the source branch to the target branch which will then mark the PR as merged, or just decline it.

Let me know if you have any specific questions, but otherwise I'm afraid in the short term there isn't much else you can do.

Charles

Hi,

My team is in the same scenario.

Has anything been done since this question was answered, or will migrating Stash to BitBucket imply we lose pull request history?

Hi,

   I am trying Move the Repositories from Stash to Bitbucket .Is it is possible ?Can anyone suggest me how can i do that.

 

Thanks,

Makarla

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

22,452 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you