blob: 2f46e2e30d1ecf1eff2e40845e84cef13d05acd6 (
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
32
33
34
|
# frozen_string_literal: true
module Gitlab
module LegacyGithubImport
class IssueFormatter < IssuableFormatter
def attributes
{
iid: number,
project: project,
milestone: milestone,
title: raw_data.title,
description: description,
state: state,
author_id: author_id,
assignee_ids: Array(assignee_id),
created_at: raw_data.created_at,
updated_at: raw_data.updated_at
}
end
def has_comments?
raw_data.comments > 0
end
def project_association
:issues
end
def pull_request?
raw_data.pull_request.present?
end
end
end
end
|