2

I want to migrate all the releases from a Gitlab repository that is using semantic release to a Github repository.

I can create new releases in the new Github repository starting from the last Gitlab repository, but I don't know how to transfer all Gitlab releases to Github, is this possible?

rfc1484
  • 9,441
  • 16
  • 72
  • 123
  • 1
    I'm not sure I understand the question. Did you push all the refs/tags from GitLab to the new GitHub repo? You can, of course, simply re-create all your releases in GitHub using the same tags and upload the same assets. In principle, you could script it if you really wanted, which could be useful if you have hundreds or thousands of releases. – sytech Dec 10 '21 at 17:47
  • Yes, the tags are already pushed and there is around a hundred releases in the original Gitlab repository. So if I understand correctly, either they can be recreated manually or a script must be used to create releases in the repository via Github API. I was hoping there was an easier way, since to script this I imagine I have to use both Github and Gitlab APIs – rfc1484 Dec 10 '21 at 18:16
  • 1
    Yeah, there is no first-party feature for this in either GitLab or GitHub (when migrating _to_ GitHub anyhow). It seems scripting it would be your best bet which, yes, would require using APIs of both services, of course. – sytech Dec 10 '21 at 19:01

1 Answers1

2

There is no first-party feature for this in either GitLab or GitHub (when migrating to GitHub anyhow). Scripting it would be your best bet which using the GitLab and GitHub APIs.

Gitlab releases API

GitHub releases API reference

sytech
  • 29,298
  • 3
  • 45
  • 86
  • For migrating releases between 2 GitHub repos, this should work - https://stackoverflow.com/a/76283567/7991646. However no such solution I could find for GitLab ---> GitHub. – jrbe228 May 18 '23 at 18:41