Class: Stratify::GitHub::Event::GollumEvent
- Inherits:
-
Object
- Object
- Stratify::GitHub::Event::GollumEvent
- Defined in:
- lib/stratify-github/events.rb
Class Method Summary collapse
Class Method Details
.make(activity, api_hash) ⇒ Object
110 111 112 113 114 115 116 |
# File 'lib/stratify-github/events.rb', line 110 def self.make(activity, api_hash) # TODO Handle more than one page per event, assuming that happens. activity.action = api_hash['payload']['pages'][0]['action'] activity.repository = api_hash['repository']['url'] rescue nil activity.thing = api_hash['payload']['pages'][0]['page_name'] activity end |
.text(activity) ⇒ Object
117 118 119 120 |
# File 'lib/stratify-github/events.rb', line 117 def self.text(activity) repo = activity.repository ? "on #{activity.repository}" : "" "#{activity.actor} #{activity.action} wiki page #{activity.thing} #{repo}" end |