Skip to content

Identify that a package is linked to a GitLab project to help drive discovery

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

Problem to solve

  1. GitLab projects can have packages (users can upload a package to a project)
  2. GitLab projects can be packages (the source of a package may be a GitLab repository)
  3. 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
  4. 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:

  1. Analyse the metadata of the package to find a repository or project URL
  2. Confirm this matches a GitLab project (either .com or self hosted)
  3. Store this in an easily accessible way (or at least a reference to the project id)
  4. Allow the frontend to use this to build a link to the project page (the frontend is currently using the PackagePresenter for its data)
  5. Possibly detect if the package repository changes

This will also need to work for each of the supported package registries.

Edited by 🤖 GitLab Bot 🤖