BigW Consortium Gitlab

issue.rb 423 Bytes
Newer Older
1 2
module Github
  module Representation
3
    class Issue < Representation::Issuable
4 5 6 7
      def labels
        raw['labels']
      end

8 9 10 11
      def state
        raw['state'] == 'closed' ? 'closed' : 'opened'
      end

12 13 14 15
      def has_comments?
        raw['comments'] > 0
      end

16 17 18 19
      def has_labels?
        labels.count > 0
      end

20 21 22 23 24 25
      def pull_request?
        raw['pull_request'].present?
      end
    end
  end
end