Move filtering from API::Groups#find_groups into GroupsFinder

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

  • Close this issue

Move filtering and ordering done on https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/api/groups.rb#L30 into GroupProjectsFinder.

The following statements should me moved into GroupFinder

        groups = groups.search(params[:search]) if params[:search].present?
        groups = groups.where.not(id: params[:skip_groups]) if params[:skip_groups].present?
        order_options = { params[:order_by] => params[:sort] }
        order_options["id"] ||= "asc"
        groups = groups.reorder(order_options)
Edited Sep 26, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading