diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-04-19 22:54:09 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-04-24 16:17:52 -0300 |
commit | e50606cd2d0c5a010d3c139cbad1eaf16701d8fd (patch) | |
tree | cfde79cadfec01124ec7878eb548a491ea592c4b /lib/github | |
parent | 09a6d32817f5f4da8ff9f3331a7046670a10beed (diff) | |
download | gitlab-ce-e50606cd2d0c5a010d3c139cbad1eaf16701d8fd.tar.gz |
Refactor rake task to to import GitHub repositores
Diffstat (limited to 'lib/github')
-rw-r--r-- | lib/github/import.rb | 1 | ||||
-rw-r--r-- | lib/github/repositories.rb | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/github/import.rb b/lib/github/import.rb index a1854f7f235..de987c263b6 100644 --- a/lib/github/import.rb +++ b/lib/github/import.rb @@ -1,5 +1,6 @@ module Github class Import + include Gitlab::ShellAdapter class MergeRequest < ::MergeRequest self.table_name = 'merge_requests' diff --git a/lib/github/repositories.rb b/lib/github/repositories.rb index b6a03173673..c1c9448f305 100644 --- a/lib/github/repositories.rb +++ b/lib/github/repositories.rb @@ -1,11 +1,13 @@ module Github class Repositories - def initialize(username) - @username = username + attr_reader :options + + def initialize(options) + @options = options end def fetch - Collection.new.fetch(repos_url) + Collection.new(options).fetch(repos_url) end private |