Moving a project from Github to Gitlab
This imports both the git repository and the full list of issues. It's a good option if you want the issue tracking to happen on CiviCRM's Gitlab.
Gitlab Import
- In Github, create a new personal Github token, granting the repo scope.
- In Gitlab, create a new project under your own personal project space (ex: lab.civicrm.org/janedoe/myextension)
- Go to the Import tab, then select Github
- Enter the access token
- Careful to only import the given project (do not click that tempting "import all" button)
Request to move the repository under the /extensions Gitlab group
After importing into your personal project space on CiviCRM's Gitlab:
- Request that it be moved to the extensions group (you can ask in the Extensions Mattermost channel, ping @bgm if no one answers). See also: how to request a new extension project on gitlab.
- Mention that you want that we migrate the project under your personal space (and please provide the link/URL to that project).
An admin will then move the project directly under https://lab.civicrm.org/extensions
Known issues
- Issues and comments will be associated with the user who did the import. Gitlab will add a mention of "Created by: [username]", but it also means that they will not be automatically added as watchers on the issue. Example: civimobileapi#26 (closed)
After the migration to Gitlab
- Update your project README.md, info.xml and docs (if any) to point your users to the new project space on lab.civicrm.org/extensions/your-extension
- Update the "git URL" field of your extension on https://civicrm.org (the auto-release scripts rely on this to detect new releases).
- Close the open issues on your github space, with links to the new issues that were created on lab.civicrm.org. If there are only a few open issues, consider providing a direct link.
This is a form of communication with your users, and they may be confused why the issue is being closed. Here is an example of a message your can adapt to your needs:
Hello,
We have moved the project space for [this extension] to CiviCRM's Gitlab.
This includes both the issue tracking and support, and merge requests.
The new URL is: https://lab.civicrm.org/extensions/[your-extension]
All issues have been migrated to: https://lab.civicrm.org/extensions/[your-extension]/issues
If you do not already have an account on CiviCRM's Gitlab, you can create an account
by registering on https://civicrm.org/user
Thank you!
Then disable issue tracking on Github.
You can also update the README on your Github repo, to mention that the project has moved:
We have moved the project space for [this extension] to CiviCRM's Gitlab.
This includes both the issue tracking and support, and merge requests.
The new URL is: https://lab.civicrm.org/extensions/[your-extension]
Then archive your Github repository.
Finally, don't forget to update your git remotes to point to your new Gitlab repository:
git remote add gitlab git@lab.civicrm.org:extensions/[your-extension].git
git push gitlab
# if creating a new release tag, also push that
git push gitlab --tags
Buildkit
If the extension is part of BuildKit, the Git URL must be updated here:
https://github.com/civicrm/civicrm-buildkit/blob/master/app/config/caches.sh