Class: Geet::Github::Issue

Inherits:
AbstractIssue show all
Defined in:
lib/geet/github/issue.rb

Instance Attribute Summary

Attributes inherited from AbstractIssue

#link, #number, #title

Class Method Summary collapse

Methods inherited from AbstractIssue

#add_labels, #assign_users, #comment, #edit, #initialize

Constructor Details

This class inherits a constructor from Geet::Github::AbstractIssue

Class Method Details

.create(title, description, api_interface) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/geet/github/issue.rb', line 9

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

.list(api_interface, assignee: nil, milestone: nil) ⇒ Object



20
21
22
23
24
# File 'lib/geet/github/issue.rb', line 20

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