Skip to content

Squash project templates on update

Hordur Freyr Yngvason requested to merge squash-project-templates-on-update into master

What does this MR do?

Follow up on https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31174 with fixes for the rake task gitlab:update_project_templates.

Prior to this MR, a template bundle updated via that task would include all branches and commits from the source repository, which is not the desired behaviour. Instead, the template bundle should include just the source code and a single standard commit explaining how the repository came to be. For example, Initialized from 'Ruby on Rails' project template.

This MR fixes that by creating a new repository from a source dump instead of doing a repository import. This approach is a bit faster, but also hackier, as it involves directly pushing to a file:// URL. I do not see this as a showstopper, as the code has only ever been meant to be used from a development environment.

Motivated by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31310

Relates to https://gitlab.com/gitlab-org/gitlab-ce/issues/46043 and https://gitlab.com/gitlab-org/gitlab-ce/issues/58204.

Example gif

for-review

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports