Permalink
Browse files

Only include the legacy webhook payload keys for the original "push" …

…event
  • Loading branch information...
1 parent 99d9bb0 commit 43751957e9563f03694486f6fa32e9cc2bde88ed @laserlemon laserlemon committed Nov 21, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 app/jobs/notifier.rb
@@ -2,7 +2,9 @@ class Notifier < Struct.new(:event, :url, :host_with_port, :rubygem, :version, :
def payload
rubygem_payload = rubygem.payload(version, host_with_port)
- rubygem_payload.merge("event" => event, "rubygem" => rubygem_payload).to_json
+ base = {"event" => event, "rubygem" => rubygem_payload}
+ payload = event == "push" ? rubygem_payload.merge(base) : base
+ payload.to_json
end
def authorization

0 comments on commit 4375195

Please sign in to comment.