Identify that a package is linked to a GitLab project to help drive discovery
Problem to solve
- GitLab projects can have packages (users can upload a package to a project)
- GitLab projects can be packages (the source of a package may be a GitLab repository)
- A project may have packages for which that project is not the source/a repository that is a package may be uploaded (as a package/artifacts) to a different project
- GitLab should have a way of identifying these relationships (identifying that project A is the source of some package uploaded to project B)
Intended users
Further details
As per the UI rework in #197926 (closed) for the package details header, we have an area for linking to the project for a given package. This link should only appear if the package project is in GitLab.
Proposal
We currently have no understanding if the repository for a package exists on GitLab. We should inspect the metadata of each package and identify if a git url (or other such item of metadata) exists and points to a valid GitLab project.
We will probably need to:
- Analyse the metadata of the package to find a repository or project URL
- Confirm this matches a GitLab project (either .com or self hosted)
- Store this in an easily accessible way (or at least a reference to the project id)
- Allow the frontend to use this to build a link to the project page (the frontend is currently using the
PackagePresenter
for its data) - Possibly detect if the package repository changes
This will also need to work for each of the supported package registries.
Edited by Tim Rizzi