debian-mirror-gitlab/app/serializers/import/githubish_provider_repo_entity.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
525 B
Ruby
Raw Normal View History

2019-07-07 11:18:12 +05:30
# frozen_string_literal: true
2020-06-23 00:09:42 +05:30
class Import::GithubishProviderRepoEntity < Import::BaseProviderRepoEntity
2019-07-07 11:18:12 +05:30
include ImportHelper
2020-06-23 00:09:42 +05:30
expose :sanitized_name, override: true do |provider_repo|
2019-07-07 11:18:12 +05:30
sanitize_project_name(provider_repo[:name])
end
2020-06-23 00:09:42 +05:30
expose :provider_link, override: true do |provider_repo, options|
2019-07-07 11:18:12 +05:30
provider_project_link_url(options[:provider_url], provider_repo[:full_name])
end
private
def owner_name(provider_repo, provider)
provider_repo.dig(:owner, :login) if provider == :github
end
end