Skip to content

Add star count as sorting option for CICD Catalog

Rajendra Kadam requested to merge 432450-sort-star-count-fe into master

What does this MR do and why?

Adds FE option for sorting catalog based on project star count.

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

Sort option on frontend

Screenshot_2024-06-04_at_2.50.28_PM

How to set up and validate locally

  1. Run the below command to create some dummy catalog resources -
bundle exec rake "gitlab:seed:ci_catalog_resources[Flightjs, 12, true]"
  1. Run the below command in rails console to assign random star count for the resource projects.
Ci::Catalog::Resource.all.each do |resource|
  resource.project.update!(star_count: rand(100))
end
  1. Check the CI/CD catalog at http://gdk.test:3000/explore/catalog or localhost based on your gdk settings.
  2. Try sorting the the catalog by selecting the Star count option.

Related to #432450 (closed)

Merge request reports