Pagure to GitLab Importer
Purpose
With Fedora and CentOS now having an official namespace on GitLab multiple projects wants to migrate their repositories from Pagure to GitLab. This initiative is aimed to provide an easy way to migrate those projects.
Resources
Initiative proposal: https://pagure.io/cpe/initiatives-proposal/issue/25
Pagure documentation: https://pagure.io/docs/pagure/
GitLab documentation: https://docs.gitlab.com/
Requirements
Self-service tool
Git commit history preservation
Ability to migrate pagure issues
Command line interface
Ability to migrate files uploaded to PRs and issues
Ability to migrate pull-requests
Mapping of Fedora identity to GitLab users
Tool should be usable by both CentOS and Fedora users
Ability to access the correct namespace on GitLab
Nice to have
List of features that would be nice to have.
Graphical UI
Web interface
Syncing the FAS usernames to GitLab as users migrate for already migrated projects
Investigation
Following are the investigations of Pagure options to export and GitLab options to import.
Conclusions
Creating the tool for migration is possible, but with a few caveats.
We don’t recommend to migrate pull requests (Importing pull requests).
We didn’t investigate the possibility of providing web interface, it’s definitely possible, but it will add much to complexity of the tool and we need to host it and deploy as well.
The main issue with the migration is that all the comments, issues are created by the user that owns the API token, which is made to execute the API calls. This issue is explained in Importing ticket with possible proposed solution.
The user that is using the tool will need to have permissions to create new repositories in the GitLab group, to which the repository will be migrated.
Proposed Roadmap
Create the tool for migration using GitLab API
(Optional) Create a bot user for migration and share the API key with trusted people. This will help to migrate some of the projects as neutral user instead of the user, who is using the tool.
Prepare the documentation for migration process.
Announce the migration tool is available.
Estimate of work
This work will need 2 developers. The estimation for this project is 4 weeks.