Skip to content

Refactor packages template data to use helper methods

What does this MR do and why?

Refactor packages template data to use helper methods

Create two methods group_packages_template_data & project_packages_template_data

Update group & project package template with methods

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

No change in UI

How to set up and validate locally

  1. rails c - Open the rails console

  2. p = Project.find(1) - Find one of your GDK projects. Project id can be found on the project home page

  3. FactoryBot.create_list(:npm_package, 10, project: p, name: p.name) - Creates 10 npm packages

  4. Add this line if above fails during the creation

     def fixture_file_upload(*args, **kwargs)
       Rack::Test::UploadedFile.new(*args, **kwargs)
     end
  5. Visit Project > Deploy > Package Registry,

  6. Visit Group > Deploy > Package Registry

  7. Visit package registry detail page Other versions tab via groups & projects package list page

  8. Confirm that packages & package assets can be deleted.

Related to #469188

Edited by Rahul Chanila

Merge request reports