Class: DesignManagement::Repository

Inherits:
ApplicationRecord show all
Includes:
Gitlab::Utils::StrongMemoize, HasRepository
Defined in:
app/models/design_management/repository.rb

Constant Summary

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Constants included from HasCheckConstraints

HasCheckConstraints::NOT_NULL_CHECK_PATTERN

Constants included from ResetOnColumnErrors

ResetOnColumnErrors::MAX_RESET_PERIOD

Instance Method Summary collapse

Methods included from HasRepository

#after_change_head_branch_does_not_exist, #after_create_repository, #after_repository_change_head, #apply_desired_default_branch, #branch_exists?, #commit, #commit_by, #commits_by, #default_branch, #default_branch=, #default_branch_from_group_preferences, #default_branch_from_preferences, #empty_repo?, #http_url_to_repo, #lfs_enabled?, #lfs_http_url_to_repo, #ref_exists?, #reload_default_branch, #repo_exists?, #repository_exists?, #repository_size_checker, #root_ref?, #ssh_url_to_repo, #storage, #url_to_repo, #valid_repo?, #web_url

Methods included from Gitlab::ShellAdapter

#gitlab_shell

Methods included from Referable

#referable_inspect, #reference_link_text, #to_reference, #to_reference_base

Methods inherited from ApplicationRecord

===, cached_column_list, #create_or_load_association, current_transaction, declarative_enum, default_select_columns, delete_all_returning, #deleted_from_database?, id_in, id_not_in, iid_in, nullable_column?, 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 Organizations::Sharding

#sharding_organization

Methods included from ResetOnColumnErrors

#reset_on_union_error, #reset_on_unknown_attribute_error

Methods included from Gitlab::SensitiveSerializableHash

#serializable_hash

Instance Method Details

#disk_pathObject



28
29
30
# File 'app/models/design_management/repository.rb', line 28

def disk_path
  project.disk_path + repo_type.path_suffix
end

#full_pathObject



24
25
26
# File 'app/models/design_management/repository.rb', line 24

def full_path
  project.full_path + repo_type.path_suffix
end

#repo_typeObject



32
33
34
# File 'app/models/design_management/repository.rb', line 32

def repo_type
  Gitlab::GlRepository::DESIGN
end

#repositoryObject



13
14
15
16
17
18
19
20
21
# File 'app/models/design_management/repository.rb', line 13

def repository
  DesignManagement::GitRepository.new(
    full_path,
    self,
    shard: repository_storage,
    disk_path: disk_path,
    repo_type: repo_type
  )
end