diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-09-23 13:47:29 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-09-30 13:48:40 +0300 |
commit | b9ccc79cb5d67e356edce3778b6a17def985ed22 (patch) | |
tree | 103aacc1d621c7d6436c2ad3a2a52d48dfc395e1 /app/controllers/ci | |
parent | 34431d8ecb1c3d3082c3e391db70b33ca7dbf056 (diff) |
Delegate ci_project parameters to projects
- It delegates name, path, gitlab_url, ssh_url_to_repo
- Remove ability to set this parameters using CI API
This fixes GitLab project rename, namespace change, repository rename, etc.
Diffstat (limited to 'app/controllers/ci')
-rw-r--r-- | app/controllers/ci/admin/runners_controller.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/ci/admin/runners_controller.rb b/app/controllers/ci/admin/runners_controller.rb index dc3508b49dd..9a68add9083 100644 --- a/app/controllers/ci/admin/runners_controller.rb +++ b/app/controllers/ci/admin/runners_controller.rb @@ -12,7 +12,10 @@ module Ci def show @builds = @runner.builds.order('id DESC').first(30) @projects = Ci::Project.all - @projects = @projects.search(params[:search]) if params[:search].present? + if params[:search].present? + @gl_projects = ::Project.search(params[:search]) + @projects = @projects.where(gitlab_id: @gl_projects.select(:id)) + end @projects = @projects.where("ci_projects.id NOT IN (?)", @runner.projects.pluck(:id)) if @runner.projects.any? @projects = @projects.page(params[:page]).per(30) end |