summaryrefslogtreecommitdiff
path: root/lib/github/import.rb
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-04-25 23:47:49 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-04-25 23:47:49 -0300
commitd082b78998d43349f6d0cbaeb90bb448aa1188c3 (patch)
tree441d3b85c44412863514ae24f48bf96f42ce497f /lib/github/import.rb
parentf184cb433b90e5b03d8a2ecf9916e7a1bfda5ee9 (diff)
downloadgitlab-ce-d082b78998d43349f6d0cbaeb90bb448aa1188c3.tar.gz
Add basic progress output to GitHub import
Diffstat (limited to 'lib/github/import.rb')
-rw-r--r--lib/github/import.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/github/import.rb b/lib/github/import.rb
index f12f979ae02..3e9162ffb9d 100644
--- a/lib/github/import.rb
+++ b/lib/github/import.rb
@@ -38,24 +38,33 @@ module Github
self.reset_callbacks :validate
end
- attr_reader :project, :repository, :repo, :options, :errors, :cached
+ attr_reader :project, :repository, :repo, :options, :errors, :cached, :verbose
def initialize(project, options)
@project = project
@repository = project.repository
@repo = project.import_source
@options = options
+ @verbose = options.fetch(:verbose, false)
@cached = Hash.new { |hash, key| hash[key] = Hash.new }
@errors = []
end
+ # rubocop: disable Rails/Output
def execute
+ puts 'Fetching repository...'.color(:aqua) if verbose
fetch_repository
+ puts 'Fetching labels...'.color(:aqua) if verbose
fetch_labels
+ puts 'Fetching milestones...'.color(:aqua) if verbose
fetch_milestones
+ puts 'Fetching pull requests...'.color(:aqua) if verbose
fetch_pull_requests
+ puts 'Fetching issues...'.color(:aqua) if verbose
fetch_issues
+ puts 'Cloning wiki repository...'.color(:aqua) if verbose
fetch_wiki_repository
+ puts 'Expiring repository cache...'.color(:aqua) if verbose
expire_repository_cache
true