Import Issues from GitLab

I’m working on migrating from a private Gitlab instance to a Github developer account with private repos. I’ve imported my repos but now I need to move the Issues in Gitlab over to Github. After looking around for a couple hours about how to do this, I can’t seem to find a simple way. 

I need to bring over Issues including…

  • Title
  • Description
  • Comment history
  • File attachments

There are enough issues that it would be impracticable to re-enter them manually. I’m fine with existing comments being collapsed into the description or something like that if fields don’t quite match up, I just need all the content. 

Is there anyone out there with insight or advice on this? 

2 Likes

Hi @drewhood,

If you are able to get that information from GitLab in an organized format, you can use GitHub’s Issue API endpoint to create issues on GitHub.com. To script this so that you don’t have to do it manually, you might be interested in Octokit which are a set of frameworks for working with the GitHub API programmatically.

Thanks!

That sounds very complicated and time consuming. There should be an easy way to import issues from gitlab. After gitlab doesn’t have any problem importing issues from github, so why can’t the opposite be made to work simply?

2 Likes

There are tools that other people have built for this purpose but since we don’t maintain them or use them regularly, we can’t vouch for these third-party tools.

Since I have the same task now to migrate a whole gitlab server with 50 projects on it, googling for some tooling to do the job revealed, among others, this guy: https://github.com/wollzelle/gitlab-github-migrate

This will be my first try. I’ll post my experience with it here.

2 Likes

How did it go?

@basejumpa : Did you find a way to migrate the Gitlab issues to Github?

Interested in how you got on with this @basejumpa 

I just gave it a go (actually, a fork with a follow-up commit https://github.com/jacklei/gitlab-github-migrate), and it has a ton of problems, at least migrating GL issues.

  1. It quickly bumps into 502 and 403 errors, presumably from getting throttled, and doesn’t complete the run. If I rerun the script, it creates dupes.
  2. It only imports my own comments, so a lot of discussions are missing.
  3. Images are broken because they’re hotlinked from GL and reuploaded to GH.

I’m glad I ran this on a test repo so I can blow it up because it made quite a mess.

I just used https://github.com/piceaTech/node-gitlab-2-github instead, and it’s so much better. 

It migrates issues without bumping into API throttling, doesn’t create dupes after multiple runs, includes comments made by other users (including a handy mapping config between GL and GH users), and has a decent UI.

The only thing it doesn’t do is migrate images, sadly. But it’s a huge step up from that other script.

1 Like