peter-murach/github — Issue #13: Hook Payload Missing Keys
Author: itspriddle
Created: 2012-02-09 16:13:41+00:00
State: open

I'm using the following code to try creating service hooks:

```ruby
repo = Github::Repos.new AUTH_HASH
repo.create_hook 'itspriddle', 'test-repo', :name => 'email', :active => true, :config => { :address => 'test@example.com' }
```

From the log:

EXECUTED: post - /repos/itspriddle/test-repo/hooks with {"name"=>"email", "active"=>true, "config"=>{}} and {"resource"=>"", "mime_type"=>""}

It seems the call to `Github::Filter#_filter_parameter_keys` in hooks.rb is removing values from the config hash. If that is commented out, the request is submitted with the proper parameters.

I've only tested this with `create_hook`, but I'd imagine it affects the other `*_hook` methods as well.