Add and streamline package project creation through UI
Problem to solve
Encourage tighter integration between projects and packages by allowing the user to create a new project on GitLab for their new package in a streamlined manner. This will include features to reduce friction for the end user, allowing them to create packages, set up CI / CD and integration with minimal effort.
Intended users
Further details
Right now, to create a new Package for use with a GitLab package registry (NPM, Maven, etc), you have to create your package locally and use the publishing tools of the package manager itself to publish the package to GitLab. If the user would like to use CI / CD, then they will have to create these themselves too. GitLab doesn't currently offer the user anything other than some documentation to help them get started.
We also are not encouraging packages to be GitLab projects themselves and leave this up to the user to decide. If we change this and encourage the package to be a GitLab project itself, this opens up the opportunity for further integration in the future. For example, the package detail could display information such as:
- Date of last commit
- Number of issues for a package
- Number of open MR's
- Build status / logs if using CI
- ...etc
Some of this is desired by users as found in the recent package survey: gitlab-org/uxr_insights#624
We do have an issue to start offering templates to the user (#29120 (closed)) but could we do more?
Proposal
Add new package button
My suggestion would be to add options to create packages from the UI of GitLab. To start with, this could be in the form of a New Package button on the Packages > List page. This would come in two parts, the new button and then a dropdown on the right hand side:
- Clicking the
New Packagebutton would open the following popup:
From here, we invite the user to create a new project for the registry of their choice. This would hard navigate the user to a new project page that would be modified to support the creation of a package project (see below).
- Clicking the
dropdown chevronwould open another new popup:
This time, we're offering the templates from #29120 (closed) as a downloadable zip file and leaving the user to configure the rest.
New package project creation
When going through option 1 above, we would eventually redirect the user to the project creation page. See below:
Annotations:
-
Prefix project name with whatever is required for the package (e.g.
@gitlabfor an NPM package) -
Default select the working group that the package is being created from
-
The description provided here could automatically populate a field like
descriptioninsidepackage.json -
Default match the group conventions
-
Add more options here:
5.1 Check to enable CI / CD Pipelines, which will create a
.gitlab-ci.ymlfile that automatically sets up pipelines to publish a new version of the package whenever a commit is made to a specific branch (default would bemaster).5.2 Add a text box so that user can specify the default branch if not desired on
master(only visible / active if 5.1 is checked)
The idea is that the newly created project would be in a state where it could start accepting commits from the user immediately and they won't have to worry about anything else (i.e. everything will be set up to automatically integrate with their package registry). By reducing this friction for the user, we would allow them to concentrate on their problems.


