99ddd1dcbe
The reason is that Gitea plan to be GitHub-compatible so it makes sense to just modify GitHubImport a bit for now, and hopefully we can change it to GitHubishImport once Gitea is 100%-compatible. Signed-off-by: Rémy Coutable <remy@rymai.me>
32 lines
675 B
Ruby
32 lines
675 B
Ruby
module Gitlab
|
|
module GithubImport
|
|
class IssueFormatter < IssuableFormatter
|
|
def attributes
|
|
{
|
|
iid: number,
|
|
project: project,
|
|
milestone: milestone,
|
|
title: raw_data.title,
|
|
description: description,
|
|
state: state,
|
|
author_id: author_id,
|
|
assignee_id: 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
|