Class: HubLink::Api::PullRequest

Inherits:
Issue
  • Object
show all
Defined in:
lib/hub_link/api/pull_request.rb

Constant Summary collapse

ADDITIONAL_EXPORT_COLUMNS =
%i(
  merged_at
  body_size
  additions
  comments_count
  review_comments_count
)

Constants inherited from Issue

Issue::EXPORT_COLUMNS

Instance Method Summary collapse

Methods inherited from Issue

#labels, list, new_from_api, #submitter, #to_h

Instance Method Details

#additionsObject



22
23
24
# File 'lib/hub_link/api/pull_request.rb', line 22

def additions
  extended_data.additions
end

#body_sizeObject



26
27
28
# File 'lib/hub_link/api/pull_request.rb', line 26

def body_size
  body.to_s.size
end

#comments_countObject



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

def comments_count
  extended_data.comments
end

#merged_atObject



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

def merged_at
  extended_data.merged_at
end

#pull_request?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/hub_link/api/pull_request.rb', line 14

def pull_request?
  true
end

#review_comments_countObject



38
39
40
# File 'lib/hub_link/api/pull_request.rb', line 38

def review_comments_count
  extended_data.review_comments
end

#reviewsObject



18
19
20
# File 'lib/hub_link/api/pull_request.rb', line 18

def reviews
  @_reviews ||= fetch_reviews
end