[go: up one dir, main page]

Skip to content

Add drop-down with File templates in Create Blank Project

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

Release notes

In hosted systems, enterprises often have a need to share their own templates across teams. This feature allows an administrator to pick a project to be the instance-wide collection of file templates. These templates were then exposed to all users through the Web Editor while the project remains secure. In addition to this, developers will now have the possibility to pick from them when creating a new Gitlab project.

Problem to solve

File templates are underutilized, primarily because they are only accessible from the UI, and only if a developer create a file from it, prefill the name to have the drop-down menu allowing for further modifications. This was made even worse with the introduction of VSCode as a WebIDE because there is no more modal menu to access them (#358809)

New project already offer to init a README file that's blank and is later filled in other commit. The goal hear is to expand further by offering to init any file available as a file template. While .gitignore and LICENSE are the most obvious candidates, .gitlab-ci.yml and Dockerfile (and any other files template coming soon) would also be great candidates to see in there.

A good approach worth inspiring from is GitHub, where a drop-down menu for each available item is provided with a default set to None.

Intended users

But realistically any Gitlab user who has to manually add these files every time it creates a project, so primarily Developers.

User experience goal

The Software Developer should be able to start a new Project, pick from the already-curated list of file templates that was made available instance wide, and opt-in on anything that's of interest for him. The project will then be initiated with the files requested without the need for an extra commit to add them afterwards.

Proposal

Add a drop-down menu with a Default on "None" that would prompt user with the same file list that would be available under File templates when creating it through the UI.

Each file types would have its own drop-down to pick from:

  • .gitignore
  • LICENSE
  • Dockerfile
  • .gitlab-ci.yml

Further details

Main benefits:

  • Re-using already existing file templates
  • Give more visibility to file templates
  • Less commits and copy pasting

Permissions and Security

No new permissions will be needed for this as it's a matter of adding existing files to a contextual menu.

Documentation

The Instance Template documentation will need to be updated to include a reference and screenshots to the fact that these files will also be made available in the New Blank Project page.

https://docs.gitlab.com/ee/administration/settings/instance_template_repository.html

Available Tier

Default Gitlab files:

  • Free

Custom File templates:

  • Premium/Silver
  • Ultimate/Gold

What is the competitive advantage or differentiation for this feature?

GitHub already offers this for .gitignore and LICENSE (https://github.com/new)

Links / references

#358809

Edited by 🤖 GitLab Bot 🤖