Class: Stratify::GitHub::Event::PullRequestEvent
- Inherits:
-
Stratify::GitHub::Event
- Object
- Stratify::GitHub::Event
- Stratify::GitHub::Event::PullRequestEvent
- Defined in:
- lib/stratify-github/events.rb
Class Method Summary collapse
Methods inherited from Stratify::GitHub::Event
Class Method Details
.make(activity, api_hash) ⇒ Object
168 169 170 171 172 |
# File 'lib/stratify-github/events.rb', line 168 def self.make(activity, api_hash) activity.payload = api_hash['payload']['pull_request']['body'] || api_hash['payload']['pull_request']['title'] activity.repository = api_hash['repository']['url'] activity end |
.text(activity) ⇒ Object
173 174 175 176 |
# File 'lib/stratify-github/events.rb', line 173 def self.text(activity) payload = trunc(activity.payload) "#{activity.actor} made a pull request on #{activity.repository} -- #{payload}" end |