Class: Geet::Gitlab::Issue
- Inherits:
-
Object
- Object
- Geet::Gitlab::Issue
- Defined in:
- lib/geet/gitlab/issue.rb
Instance Attribute Summary collapse
-
#link ⇒ Object
readonly
Returns the value of attribute link.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(number, title, link) ⇒ Issue
constructor
A new instance of Issue.
Constructor Details
#initialize(number, title, link) ⇒ Issue
Returns a new instance of Issue.
8 9 10 11 12 |
# File 'lib/geet/gitlab/issue.rb', line 8 def initialize(number, title, link) @number = number @title = title @link = link end |
Instance Attribute Details
#link ⇒ Object (readonly)
Returns the value of attribute link.
6 7 8 |
# File 'lib/geet/gitlab/issue.rb', line 6 def link @link end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
6 7 8 |
# File 'lib/geet/gitlab/issue.rb', line 6 def number @number end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
6 7 8 |
# File 'lib/geet/gitlab/issue.rb', line 6 def title @title end |
Class Method Details
.list(api_interface, assignee: nil, milestone: nil) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/geet/gitlab/issue.rb', line 16 def self.list(api_interface, assignee: nil, milestone: nil) api_path = "projects/#{api_interface.path_with_namespace(encoded: true)}/issues" request_params = {} request_params[:assignee_id] = assignee.id if assignee request_params[:milestone] = milestone.title if milestone response = api_interface.send_request(api_path, params: request_params, multipage: true) response.map do |issue_data, result| number = issue_data.fetch('iid') title = issue_data.fetch('title') link = issue_data.fetch('web_url') new(number, title, link) end end |