gitlab-org--gitlab-foss/app/services/projects/import_export.rb

24 lines
629 B
Ruby
Raw Normal View History

2016-03-07 12:26:15 -05:00
module Projects
module ImportExport
extend self
def export_path(relative_path:)
File.join(storage_path, "#{Time.now.strftime('%Y-%m-%d_%H-%M-%3N')}_gitlab_export/#{relative_path}")
2016-03-07 12:26:15 -05:00
end
def project_atts
2016-03-11 03:46:00 -05:00
%i(name path description issues_enabled wall_enabled merge_requests_enabled wiki_enabled snippets_enabled visibility_level archived)
2016-03-07 12:26:15 -05:00
end
def project_tree
2016-03-11 03:46:00 -05:00
%i(project_members issues merge_requests labels milestones snippets releases events commit_statuses)
2016-03-07 12:26:15 -05:00
end
private
def storage_path
File.join(Settings.shared['path'], 'tmp/project_exports')
end
end
end