Class: BulkImport

Inherits:
ApplicationRecord show all
Defined in:
app/models/bulk_import.rb

Overview

The BulkImport model links all models required for a bulk import of groups and projects to a GitLab instance. It associates the import with the responsible user.

Constant Summary collapse

MIN_MAJOR_VERSION =
14
MIN_MINOR_VERSION_FOR_PROJECT =
4

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApplicationRecord

cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order

Methods included from SensitiveSerializableHash

#serializable_hash

Class Method Details

.all_human_statusesObject


55
56
57
# File 'app/models/bulk_import.rb', line 55

def self.all_human_statuses
  state_machine.states.map(&:human_name)
end

.min_gl_version_for_project_migrationObject


51
52
53
# File 'app/models/bulk_import.rb', line 51

def self.min_gl_version_for_project_migration
  Gitlab::VersionInfo.new(MIN_MAJOR_VERSION, MIN_MINOR_VERSION_FOR_PROJECT)
end

Instance Method Details

#source_version_infoObject


47
48
49
# File 'app/models/bulk_import.rb', line 47

def source_version_info
  Gitlab::VersionInfo.parse(source_version)
end