Commit abfa9b41 authored by Kamil Trzcinski's avatar Kamil Trzcinski
Browse files

Fix project API listing returning empty list when first projects are not added to CI

The CI prefers to receive the projects added to CI first
parent 0ac87af6
......@@ -7,6 +7,7 @@ v7.14.0 (unreleased)
- Use avatars received from GitLab
- Refactor GitLab API usage to use either access_token or private_token depending on what was specified during login
- Allow to use access_token for API requests
- Fix project API listing returning empty list when first projects are not added to CI
- Added support for CI skipped status
......
......@@ -34,7 +34,7 @@ module API
# GET /projects
get do
gitlab_projects = Project.from_gitlab(
current_user, :authorized, { page: params[:page], per_page: params[:per_page] }
current_user, :authorized, { page: params[:page], per_page: params[:per_page], ci_enabled_first: true }
)
ids = gitlab_projects.map { |project| project.id }
......@@ -48,7 +48,7 @@ module API
# GET /projects/owned
get "owned" do
gitlab_projects = Project.from_gitlab(
current_user, :owned, { page: params[:page], per_page: params[:per_page] }
current_user, :owned, { page: params[:page], per_page: params[:per_page], ci_enabled_first: true }
)
ids = gitlab_projects.map { |project| project.id }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment