In my previous blog From Assembla to GITHub – Phase 1: Migrate your SVN repository to GIT I explained how to migrate your SVN repository to GIT and commit it to GITHub.

In this blog I will give some information on how to migrate Assembla issues into your GITHub repository, without losing any data.

Prerequisite

A PHP Web server to run the script

Chapter 1 – Export data from Assembla

From your Assembla console, Tickets->Settings->Export & Import and Export your tickets, this will generate a bak file (they say it is a JSON, but basically is text file with some JSON structure)

Assembla export

Chapter 2 – Import bak file into your GITHub repository

Here comes the fun… There is no easy way to import this file in GITHub, but they have very powerful REST services.

So, I decided to create a PHP script that parses the export file from Assembla and import to GITHub using their services. GITHub has no official API for PHP, but there are several GITHub repositories that are creating them.

I decided to use github-php-client, that, IMHO, has a great structure and flexibility. Unfortunately, these APIs are not fully compliant with the version 3 of GITHub services.

No fear! Is it an open source project? OK, let’s collaborate…

I created a fork of that project and I completed the API fixing the missing pieces for my scope (currently most of my changes have been included into the master, otherwise you can use my fork).

Then a simple PHP script will do the dirty job… The code is shared as open source here.

github import

After few minutes all the issues, comments and milestones were imported into my new GITHub repository!

Note Before starting the import of the file I suggest to test the export file in a dummy project, only after this test I would suggest to try on your official GIT repository. I have no responsibility on the use of this script.

Published by Ivan Femia

I have more than 10 yrs of experience in IT; born as Windows Basis Administrator I moved rapidly to my real passion: web programming and R&D. I have been at Techedge since 2007 and I'm head of development of Techedge Labs Team. I focused my researches in emerging technologies, mobile, WebDynpro ABAP, Flash Island, Adobe Interactive Form and ABAP. My colleagues consider me one of the top reference for ABAP, ABAP OO, WebDynpro ABAP and high tech topic. I'm owner of the SCN Community Projects on SAP Code Exchange: abap2xlsx, augmentedSAP, abap2GApps, abap2docx and Clone Hunter. Follow me on Twitter @IvanFemia

Leave a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: