Add package to a project from the Package Registry UI
Problem to solve
The GitLab Package Registry allows users to build, publish and share packages across multiple formats (npm, maven, conan) right alongside their source code and pipelines. GitLab provides a project and group level user interface that displays a list of packages, corresponding metadata and files. The goal of the group level UI is to help users discover and then use packages in their project.
The problem is that we do not give users the ability to easily add a given package to their project from the Package Registry UI.
- As a Developer, when I am navigating my group's packages and find the package I am looking for, need the ability to add that package to my project, so that I don't have to manually edit my code.
- Adding a package should submit an MR that will add the package and required files to the users project
- Help users to identify and use the correct version of a package
- Automate the process and reduce risk of manually updating package files
- Add a button to the Package Registry UI that will allow users to add that package to their project.
- A developer is working on their project when they realize they need a new npm package.
- They know that the package has already been created and is being used in another project within a group they are a part of in GitLab.
- They navigate to the group level package registry and look for the package by sorting by name.
- They find the correct package and version that they would like to use.
- They click a button that will add the package to their project.
- The button opens up an MR that will add the required files.
- Since their project already has
package.jsonfiles, the MR updates those files accordingly.
- If the project does not already contain their
package.jsonfiles, they will need to be created and filled in with the appropriate details.
- The projects pipelines and tests run and return all
- The developer approves the MR
- The package is now available and ready for use in their project.
Permissions and Security
- Reporters and above can view and pull from the Package Registry. However, only Developers and above can push to the Package Registry. So, only developers and above should see the button to add a package to their project.
- No documentation updates, although we will need to have some copy written for the automated MRs, buttons and call to actions.
What does success look like, and how can we measure that?
- Success looks like we have improved the user experience for adding packages to a project. We can test this when we do our quarterly UX baseline evaluation.
- Track: Number of packages added to projects.