Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/github_gists_import/representation/gist.rb')
-rw-r--r--lib/gitlab/github_gists_import/representation/gist.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/github_gists_import/representation/gist.rb b/lib/gitlab/github_gists_import/representation/gist.rb
index 0d309a98f38..674da4f3400 100644
--- a/lib/gitlab/github_gists_import/representation/gist.rb
+++ b/lib/gitlab/github_gists_import/representation/gist.rb
@@ -65,6 +65,10 @@ module Gitlab
def github_identifiers
{ id: id }
end
+
+ def total_files_size
+ files.values.sum { |f| f[:size].to_i }
+ end
end
end
end