debian-mirror-gitlab/lib/gitlab/legacy_github_import/release_formatter.rb

30 lines
552 B
Ruby
Raw Normal View History

2019-02-15 15:39:39 +05:30
# frozen_string_literal: true
2016-09-29 09:46:39 +05:30
module Gitlab
2018-03-17 18:26:18 +05:30
module LegacyGithubImport
2016-09-29 09:46:39 +05:30
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
2016-11-03 12:29:30 +05:30
def project_association
:releases
end
def find_condition
{ tag: raw_data.tag_name }
2016-09-29 09:46:39 +05:30
end
def valid?
!raw_data.draft
end
end
end
end