Sha256: 3e4fb8d53a45bcaf813c42d3393de8a7e8f512754f59f773e9f12855709ae803

Contents?: true

Size: 804 Bytes

Versions: 22

Compression:

Stored size: 804 Bytes

Contents

# frozen_string_literal: true

module Geet
  module Github
    # See AbstractIssue for the circular dependency issue notes.
    autoload :AbstractIssue, File.expand_path('abstract_issue', __dir__)

    class Issue < Geet::Github::AbstractIssue
      def self.create(title, description, api_interface, **)
        api_path = 'issues'
        request_data = { title: title, body: description }

        response = api_interface.send_request(api_path, data: request_data)

        issue_number, title, link = response.fetch_values('number', 'title', 'html_url')

        new(issue_number, api_interface, title, link)
      end

      def self.list(api_interface, assignee: nil, milestone: nil)
        super do |issue_data|
          !issue_data.key?('pull_request')
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
geet-0.22.0 lib/geet/github/issue.rb
geet-0.21.0 lib/geet/github/issue.rb
geet-0.19.0 lib/geet/github/issue.rb
geet-0.18.0 lib/geet/github/issue.rb
geet-0.17.0 lib/geet/github/issue.rb
geet-0.16.0 lib/geet/github/issue.rb
geet-0.15.0 lib/geet/github/issue.rb
geet-0.14.0 lib/geet/github/issue.rb
geet-0.13.0 lib/geet/github/issue.rb
geet-0.12.0 lib/geet/github/issue.rb
geet-0.11.0 lib/geet/github/issue.rb
geet-0.10.0 lib/geet/github/issue.rb
geet-0.9.0 lib/geet/github/issue.rb
geet-0.8.0 lib/geet/github/issue.rb
geet-0.7.0 lib/geet/github/issue.rb
geet-0.6.0 lib/geet/github/issue.rb
geet-0.5.0 lib/geet/github/issue.rb
geet-0.4.4 lib/geet/github/issue.rb
geet-0.4.3 lib/geet/github/issue.rb
geet-0.4.2 lib/geet/github/issue.rb