Skip to content

Group level file templates

Templates are important for easily getting started with a project and increase consistency between projects. If a company has a custom license they use for all their projects, it would currently need to be copied into every new project manually.

Building on the work of https://gitlab.com/gitlab-org/gitlab-ee/issues/5986 and https://gitlab.com/gitlab-org/gitlab-ee/issues/5306, we should make it possible for templates to be created in a central repository and be available to every project in the group. Adding group support makes this feature useful for large instances where there independent teams that need different templates and want to manage them separately.

We should allow Group Maintainers to select a repository in the group to be a template repository for the group and sub-groups.

Proposal

  • Add a setting for Groups to select one repository in the group to be the group template repository
  • Files in the default branch of the LICENSE directory of the template repository will be shown in the license template list when creating/editing a file in projects in the group or sub-group
    • Projects shared from one group to another should not inherit templates from that group.
  • The name of the template in the template list will be the name of the file

We can extend the existing pattern which we built on in https://gitlab.com/gitlab-org/gitlab-ee/issues/5306

Designs

Group Settings Template chooser dropdown (in file editor)
image template-chooser
Edited by Jeethu Karthik