blob: fdab6b512ea34039acc7dac8ed494b4734c3e03b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# frozen_string_literal: true
module Gitlab
module LegacyGithubImport
class ReleaseFormatter < BaseFormatter
def attributes
{
project: project,
tag: raw_data.tag_name,
name: raw_data.name,
description: raw_data.body,
created_at: raw_data.created_at,
released_at: raw_data.published_at,
updated_at: raw_data.created_at
}
end
def project_association
:releases
end
def find_condition
{ tag: raw_data.tag_name }
end
def valid?
!raw_data.draft
end
end
end
end
|