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

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

28 lines
700 B
Ruby
Raw Normal View History

2020-06-23 00:09:42 +05:30
# frozen_string_literal: true
class Import::ProviderRepoSerializer < BaseSerializer
def represent(repo, opts = {})
entity =
case opts[:provider]
when :fogbugz
Import::FogbugzProviderRepoEntity
when :github, :gitea
Import::GithubishProviderRepoEntity
when :bitbucket
Import::BitbucketProviderRepoEntity
when :bitbucket_server
Import::BitbucketServerProviderRepoEntity
when :gitlab
Import::GitlabProviderRepoEntity
2020-10-24 23:57:45 +05:30
when :manifest
Import::ManifestProviderRepoEntity
2020-06-23 00:09:42 +05:30
else
raise NotImplementedError
end
super(repo, opts, entity)
end
end
2022-10-11 01:57:18 +05:30
Import::ProviderRepoSerializer.prepend_mod