debian-mirror-gitlab/lib/gitlab/legacy_github_import/issue_formatter.rb

35 lines
720 B
Ruby
Raw Normal View History

2019-02-15 15:39:39 +05:30
# frozen_string_literal: true
module Gitlab
2018-03-17 18:26:18 +05:30
module LegacyGithubImport
2017-08-17 22:00:37 +05:30
class IssueFormatter < IssuableFormatter
def attributes
{
2016-06-02 11:05:42 +05:30
iid: number,
project: project,
2016-06-02 11:05:42 +05:30
milestone: milestone,
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),
created_at: raw_data.created_at,
2016-09-29 09:46:39 +05:30
updated_at: raw_data.updated_at
}
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?
end
end
end
end