Adds support to filter packages by status
What does this MR do and why?
Adds support to filter packages by status
Adds new package status token
Update package_search
to add status query param. I've opened Improve registry search query params generation (!150137 - merged) to cleanup empty query params.
Similar MR: Adds support to filter packages by version (!139403 - merged)
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
Before | After |
---|---|
How to set up and validate locally
- On your rails console
bundle exec rails c
-
def fixture_file_upload(*args, **kwargs) Rack::Test::UploadedFile.new(*args, **kwargs) end
- Find the project where you want to work with the package registry
p = Project.find(<project_id>)
- Create 25 packages:
FactoryBot.create_list(:npm_package, 25, project: p)
- Update the status of the package to
ERROR
Packages::Package.last.update(status: :error)
-
- Go to the package registry using the sidebar or via the URL
<hostname>/<project>/-/package
- Confirm that filtering by status, filters the results
Related to #451054 (closed)
Edited by Eduardo Sanz García