GitLab/Hosting a project on GitLab

= Hosting a project on GitLab =

Where should your project live?
You have two options:


 * 1) Host the project under your personal namespace. This is appropriate and expected for:
 * 2) * Personal or user-specific tooling such as dotfiles
 * 3) * Early experimental prototypes and short-lived exploratory work
 * 4) * Forks of projects you can't access directly, but wish to make merge requests from
 * 5) Host the project under a group. This is appropriate for long-lived, shared projects that benefit the Wikimedia movement and the MediaWiki software ecosystem.

Generally, supported GitLab projects live in a group named for the functional area of code, under the top-level /repos. This gives access to a shared pool of CI runners.

Users should typically be added to the project's group with an appropriate access level, rather than to the specific project.

There are some exceptions to this layout, where there are differences in policy around project trust and access to CI runners: First, check the list of subgroups under repos to see if an appropriate group already exists. Most of the existing ones correlate to WMF teams or affiliate organizations, but in future they will likely include large functional areas like MediaWiki.
 * /toolforge-repos
 * /cloudvps-repos

If you see an existing group that seems to be a match, view the group and click on "Subgroup information" in the upper lefthand corner. Then navigate to "Members" to see existing members of the group. Ask one of them to invite you to the group. (TODO: What's the best general contact mechanism here? Phabricator form?)

If you do not find an appropriate group but think one should be created please use this form to request a new group.

Creating a new project
TODO

Mirroring a project to GitLab

 * Always use  for primary branch: See T281593
 * TODO: How to rename branches
 * Don't use issues - these will be automatically disabled anyway
 * Don't use wikis - these will be automatically disabled anyway
 * TODO: Project settings
 * TODO: Copying the repo over (including review metadata with ).
 * TODO: Copying the repo over (including review metadata with ).

Archiving the old project on Gerrit, GitLab, or Phabricator

 * TODO: Remove from CI
 * TODO: Update Phabricator mirroring?
 * TODO: Updating external references and docs
 * TODO: Mirroring to GitHub
 * TODO: Changing remotes on existing clones

Enabling GitLab CI for a project

 * TODO: This is likely a guide unto itself
 * TODO: Adding