debian-mirror-gitlab/lib/github/representation/issue.rb
2017-08-17 22:00:37 +05:30

25 lines
423 B
Ruby

module Github
module Representation
class Issue < Representation::Issuable
def labels
raw['labels']
end
def state
raw['state'] == 'closed' ? 'closed' : 'opened'
end
def has_comments?
raw['comments'] > 0
end
def has_labels?
labels.count > 0
end
def pull_request?
raw['pull_request'].present?
end
end
end
end