Importing/moving a project from Github to Gitlab
This imports both the git repo and the full list of issues. It's a good option if you want the issue tracking to happen on CiviCRM's Gitlab.
- In Github, create a new personal Github token
- 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)
Once that is done:
- Request a new extension project space, as documented in 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).
The admins will then move the project directly under https://lab.civicrm.org/extensions
- 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
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!
After a few days/weeks, consider disabling issue tracking on Github.
You can still use the Github repository, if that is how your tooling is setup, but don't forget to also push to your new Gitlab repository:
git remote add gitlab firstname.lastname@example.org:extensions/[your-extension].git git push gitlab # if creating a new release tag, also push that git push gitlab --tags
If the extension is part of BuildKit, the Git URL must be updated here: