[go: up one dir, main page]

Skip to content

Use project forking process for creating projects from templates

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

When a new project is created from a custom project template, GitLab's project import/export functionality is used. To me, this doesn't produce the result I expect in the new project. The import/export process carries over information that I do not want (e.g., previously run pipelines), and leaves behind information that I do want (e.g., the project avatar).

Further details

Project templates simplify the process of setting up a new project. I prepared a number of templates in anticipation of the custom project templates feature in GitLab 11.2. But, I've found the results rather lacking.

The current implementation doesn't deliver the user experience I was expecting to developers creating new projects from templates. The newly created projects don't “feel” new. For example, issues, merge requests, and CI pipelines from the template project are copied over to the new project. From my perspective, these are about the template projects themselves, and should not be carried over to new projects. On the other hand, small details like the project avatar are not copied to new projects.

The project import/export documentation lists the exported contents.

The end result of the current implementation is that new projects start off in a messy state, and they are missing all fine details from the project template that were meant to boost the developer experience.

Proposal

Instead of using the import/export process, perhaps creating projects from a custom template should use the project forking process. When a project is forked, details like the project avatar are preserved, while issues, merge requests, and pipelines are left behind. The result is a much cleaner new project, and almost exactly what I expected the create project from custom template feature to deliver.

The equivalent procedure in lieu of creating a project from a custom project template is:

  1. Go to the project template.
  2. Click fork.
  3. Choose the target namespace.
  4. Under Settings → General → Advanced, click Remove fork relationship.
  5. Under Settings → General → Advanced, rename the repository.

What does success look like, and how can we measure that?

I'd like the result of creating a project from a project template to be more like forking a project than importing/exporting a project.

Links / references

Relates to gitlab-org/gitlab-ce#50880 and gitlab-org/gitlab-ee#7317.

Edited by 🤖 GitLab Bot 🤖