summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/webhook.rb
diff options
context:
space:
mode:
Diffstat (limited to 'data/rbot/plugins/webhook.rb')
-rw-r--r--data/rbot/plugins/webhook.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/data/rbot/plugins/webhook.rb b/data/rbot/plugins/webhook.rb
index cf93d9a7..502b5e93 100644
--- a/data/rbot/plugins/webhook.rb
+++ b/data/rbot/plugins/webhook.rb
@@ -227,6 +227,13 @@ class WebHookPlugin < Plugin
num = json[:size] || json[:commits].size rescue nil
stream_hash[:number] = _("%{num} commits") % { :num => num } if num
+ case event
+ when :watch
+ stream_hash[:number] ||= 'watching 👀%{watchers_count}' % json[:repository]
+ when :star
+ stream_hash[:number] ||= 'star ☆ %{watchers_count}' % json[:repository]
+ end
+
debug stream_hash
return input_stream.merge stream_hash