2016-01-14 18:37:52 +05:30
|
|
|
module Gitlab
|
|
|
|
module GithubImport
|
2017-08-17 22:00:37 +05:30
|
|
|
class IssueFormatter < IssuableFormatter
|
2016-01-14 18:37:52 +05:30
|
|
|
def attributes
|
|
|
|
{
|
2016-06-02 11:05:42 +05:30
|
|
|
iid: number,
|
2016-01-14 18:37:52 +05:30
|
|
|
project: project,
|
2016-06-02 11:05:42 +05:30
|
|
|
milestone: milestone,
|
2016-01-14 18:37:52 +05:30
|
|
|
title: raw_data.title,
|
|
|
|
description: description,
|
|
|
|
state: state,
|
|
|
|
author_id: author_id,
|
2017-08-17 22:00:37 +05:30
|
|
|
assignee_ids: Array(assignee_id),
|
2016-01-14 18:37:52 +05:30
|
|
|
created_at: raw_data.created_at,
|
2016-09-29 09:46:39 +05:30
|
|
|
updated_at: raw_data.updated_at
|
2016-01-14 18:37:52 +05:30
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
def has_comments?
|
|
|
|
raw_data.comments > 0
|
|
|
|
end
|
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
def project_association
|
|
|
|
:issues
|
|
|
|
end
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
def pull_request?
|
|
|
|
raw_data.pull_request.present?
|
2016-01-14 18:37:52 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|