summaryrefslogtreecommitdiff
path: root/lib/gitlab/legacy_github_import/branch_formatter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/legacy_github_import/branch_formatter.rb')
-rw-r--r--lib/gitlab/legacy_github_import/branch_formatter.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/gitlab/legacy_github_import/branch_formatter.rb b/lib/gitlab/legacy_github_import/branch_formatter.rb
index 1177751457f..372c6b2e8a0 100644
--- a/lib/gitlab/legacy_github_import/branch_formatter.rb
+++ b/lib/gitlab/legacy_github_import/branch_formatter.rb
@@ -3,7 +3,17 @@
module Gitlab
module LegacyGithubImport
class BranchFormatter < BaseFormatter
- delegate :repo, :sha, :ref, to: :raw_data
+ def repo
+ raw_data[:repo]
+ end
+
+ def sha
+ raw_data[:sha]
+ end
+
+ def ref
+ raw_data[:ref]
+ end
def exists?
branch_exists? && commit_exists?
@@ -14,7 +24,7 @@ module Gitlab
end
def user
- raw_data.user&.login || 'unknown'
+ raw_data.dig(:user, :login) || 'unknown'
end
def short_sha