Class: HubLink::Api::Review

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/hub_link/api/review.rb

Constant Summary collapse

EXPORT_COLUMNS =
%i(
  id
  pull_request_id
  submitted_at
  reviewer
  reply?
  state
  html_url
  body
  review_comments_count
)

Instance Method Summary collapse

Instance Method Details

#reply?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/hub_link/api/review.rb', line 20

def reply?
  reviewer == submitter
end

#review_comments_countObject



30
31
32
# File 'lib/hub_link/api/review.rb', line 30

def review_comments_count
  review_comments.size
end

#reviewerObject



16
17
18
# File 'lib/hub_link/api/review.rb', line 16

def reviewer
  user&.
end

#submitted_atObject



24
25
26
27
28
# File 'lib/hub_link/api/review.rb', line 24

def 
  if 
    super
  end
end

#to_hObject



34
35
36
# File 'lib/hub_link/api/review.rb', line 34

def to_h
  Slicer.new(self, columns: EXPORT_COLUMNS).to_h
end