Class: Gitlab::LegacyGithubImport::BranchFormatter
Instance Attribute Summary
#client, #formatter, #project, #raw_data
Instance Method Summary
collapse
#create!, #initialize, #url
Instance Method Details
#exists? ⇒ Boolean
8
9
10
|
# File 'lib/gitlab/legacy_github_import/branch_formatter.rb', line 8
def exists?
branch_exists? && commit_exists?
end
|
#short_sha ⇒ Object
20
21
22
|
# File 'lib/gitlab/legacy_github_import/branch_formatter.rb', line 20
def short_sha
Commit.truncate_sha(sha)
end
|
#user ⇒ Object
16
17
18
|
# File 'lib/gitlab/legacy_github_import/branch_formatter.rb', line 16
def user
raw_data.user&.login || 'unknown'
end
|
#valid? ⇒ Boolean
12
13
14
|
# File 'lib/gitlab/legacy_github_import/branch_formatter.rb', line 12
def valid?
sha.present? && ref.present?
end
|