diff options
author | Stan Hu <stanhu@gmail.com> | 2015-10-19 20:32:15 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-10-19 20:39:59 +0300 |
commit | 4ad64ab3f4705b7fa88f855d67e0d2d268c5e395 (patch) | |
tree | 1f20b99cd90089bfd3384e045cb8349786651d54 /app/controllers/import | |
parent | 87d710f5a5661f31876fb5423b6cc588230ff8dc (diff) |
Fix duplicate repositories in GitHub import page
By default, all the current user's repositories are accessible via the
/users endpoint. There's no need to traverse all the organization
repositories as well.
See:
* http://www.rubydoc.info/github/pengwynn/octokit/Octokit/Client/Repositories#repositories-instance_method
* https://developer.github.com/v3/repos/#list-your-repositories
Closes #2523
Diffstat (limited to 'app/controllers/import')
-rw-r--r-- | app/controllers/import/github_controller.rb | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/app/controllers/import/github_controller.rb b/app/controllers/import/github_controller.rb index aae77d384c6..67bf4190e7e 100644 --- a/app/controllers/import/github_controller.rb +++ b/app/controllers/import/github_controller.rb @@ -11,10 +11,6 @@ class Import::GithubController < Import::BaseController def status @repos = client.repos - client.orgs.each do |org| - @repos += client.org_repos(org.login) - end - @already_added_projects = current_user.created_projects.where(import_type: "github") already_added_projects_names = @already_added_projects.pluck(:import_source) |