gitlab-org--gitlab-foss/lib/github/representation/issue.rb

26 lines
423 B
Ruby
Raw Normal View History

2017-04-12 21:41:58 -04:00
module Github
module Representation
class Issue < Representation::Issuable
2017-04-13 17:21:03 -04:00
def labels
raw['labels']
end
2017-04-12 21:41:58 -04:00
def state
raw['state'] == 'closed' ? 'closed' : 'opened'
end
2017-04-13 16:31:29 -04:00
def has_comments?
raw['comments'] > 0
end
2017-04-13 17:21:03 -04:00
def has_labels?
labels.count > 0
end
2017-04-12 21:41:58 -04:00
def pull_request?
raw['pull_request'].present?
end
end
end
end