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

33 lines
683 B
Ruby
Raw Normal View History

module Gitlab
module GithubImport
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