summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2015-08-05 10:15:26 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2015-08-05 10:15:26 +0000
commit9d95dfe6018a6d039bc4f0d9ff42131b0ff9505c (patch)
tree5929b1508dd2dbee63aa8a6a8a0646fbf9bbbd23 /lib/api/projects.rb
parent0ac87af6ce25abf7e12a63a9cec1a2d10c841196 (diff)
parent1779c1d49f36fe255adcc12764b70561ecb5c351 (diff)
downloadgitlab-ci-9d95dfe6018a6d039bc4f0d9ff42131b0ff9505c.tar.gz
Merge branch 'fix-projects-api-empty-list' into 'master'
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 /cc @vsizov See merge request !225
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index 0311c56..58539d3 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -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 }