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

28 lines
515 B
Ruby
Raw Normal View History

2016-09-29 09:46:39 +05:30
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
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