Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/github_import/representation/release_attachments.rb')
-rw-r--r--lib/gitlab/github_import/representation/release_attachments.rb44
1 files changed, 0 insertions, 44 deletions
diff --git a/lib/gitlab/github_import/representation/release_attachments.rb b/lib/gitlab/github_import/representation/release_attachments.rb
deleted file mode 100644
index fd272be2405..00000000000
--- a/lib/gitlab/github_import/representation/release_attachments.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-# frozen_string_literal: true
-
-# This class only partly represents Release record from DB and
-# is used to connect ReleasesAttachmentsImporter with ReleaseAttachmentsImporter
-# without modifying ObjectImporter a lot.
-# Attachments are inside release's `description`.
-module Gitlab
- module GithubImport
- module Representation
- class ReleaseAttachments
- include ToHash
- include ExposeAttribute
-
- attr_reader :attributes
-
- expose_attribute :release_db_id, :description
-
- # Builds a event from a GitHub API response.
- #
- # release - An instance of `Release` model.
- def self.from_db_record(release)
- new(
- release_db_id: release.id,
- description: release.description
- )
- end
-
- def self.from_json_hash(raw_hash)
- new Representation.symbolize_hash(raw_hash)
- end
-
- # attributes - A Hash containing the event details. The keys of this
- # Hash (and any nested hashes) must be symbols.
- def initialize(attributes)
- @attributes = attributes
- end
-
- def github_identifiers
- { db_id: release_db_id }
- end
- end
- end
- end
-end