summaryrefslogtreecommitdiff
path: root/lib/gitlab/github_import/release_formatter.rb
blob: 73d643b00ad67cb5f3765f184275787ee9e9cbdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module Gitlab
  module GithubImport
    class ReleaseFormatter < BaseFormatter
      def attributes
        {
          project: project,
          tag: raw_data.tag_name,
          description: raw_data.body,
          created_at: raw_data.created_at,
          updated_at: raw_data.created_at
        }
      end

      def klass
        Release
      end

      def valid?
        !raw_data.draft
      end
    end
  end
end