Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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 }
 
Loading
Loading
@@ -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 }
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment