Class: Stratify::GitHub::Event::PullRequestReviewCommentEvent

Inherits:
Stratify::GitHub::Event show all
Defined in:
lib/stratify-github/events.rb

Class Method Summary collapse

Methods inherited from Stratify::GitHub::Event

repo_url, trunc

Class Method Details

.make(activity, api_hash) ⇒ Object



180
181
182
183
184
# File 'lib/stratify-github/events.rb', line 180

def self.make(activity, api_hash)
  activity.payload    = api_hash['payload']['comment']['body']
  activity.repository = api_hash['repository']['url']
  activity
end

.text(activity) ⇒ Object



185
186
187
188
# File 'lib/stratify-github/events.rb', line 185

def self.text(activity)
  payload = trunc(activity.payload)
  "#{activity.actor} commented on a pull request on #{activity.repository} -- #{payload}"
end