Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0a471b6

Browse files
committed
include user and repo in haystack payload
1 parent 1b54101 commit 0a471b6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

github-services.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,14 @@ def service(name)
5858
# redact sensitive info in hook_data hash
5959
hook_data = data || params[:data]
6060
%w[password token].each { |key| hook_data[key] &&= '<redacted>' }
61+
owner = hook_payload['repository']['owner']['name'] rescue nil
62+
repo = hook_payload['repository']['name'] rescue nil
6163
report_exception boom,
6264
:hook_name => name,
6365
:hook_data => hook_data.inspect,
64-
:hook_payload => (payload || params[:payload]).inspect
66+
:hook_payload => (payload || params[:payload]).inspect,
67+
:user => owner,
68+
:repo => "#{owner}/#{repo}"
6569
raise
6670
end
6771
end

0 commit comments

Comments
 (0)