This script can be used to merge multiple GitLab projects into a single one.
It merges issues and merge requests, assigns new id's and updates the links between them.
It does not run on the GitLab server itself, but modifies the GitLab exports of your projects and creates a new export that you can import as the new project.
Also it does not merge the git repos. It only creates a new project.json. But there are tools out there to do that.
- create a new project on GitLab
- clone the new project
- merge your old repos into the new repo using a tool like tomono or monorepo-tools
- export your source projects, unpack them into
in/source_projects
, one folder for each project- Example:
in/source_projects/web
in/source_projects/api
- Example:
- export your destination project, unpack it into
in/destination_project
into a folder- Example:
in/destination_project/newproject
- Example:
- run the script.
node index
- the new
project.json
is written toout/project.json
- copy it to your destination project folder, pack it again and import it in GitLab
- links to issues and merge requests in the git commit log are not rewritten yet
ci_pipelines
andpipelines
are not merged yet
License: MIT