mirror of
https://github.com/gitlabhq/gitlabhq.git
synced 2025-08-01 16:46:16 +00:00
28 lines
576 B
Ruby
28 lines
576 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Gitlab
|
|
module GithubImport
|
|
class ContributionsMapper
|
|
def initialize(project)
|
|
@project = project
|
|
end
|
|
|
|
def user_mapper
|
|
::Gitlab::Import::SourceUserMapper.new(
|
|
namespace: project.root_ancestor,
|
|
source_hostname: project.safe_import_url,
|
|
import_type: ::Import::SOURCE_GITHUB
|
|
)
|
|
end
|
|
|
|
def user_mapping_enabled?
|
|
Gitlab::GithubImport::Settings.new(project).user_mapping_enabled?
|
|
end
|
|
|
|
private
|
|
|
|
attr_reader :project
|
|
end
|
|
end
|
|
end
|