module Github::Repos::PubSubHubbub
def subscribe_service(user_name, repo_name, service_name, params={})
:event => 'watch'
:token => 'abc123',
:room => 'Commits',
:subdomain => 'github',
@github.repos.subscribe_service 'user-name', 'repo-name', 'campfire',
@github = Github.new :oauth_token => '...'
= Examples
* :event - Required hash key for the type of event. The default event is push
* service-name - Required string
* repo-name - Required string,
= Parameters
Subscribe repository to service hook through pubsubhubbub
def subscribe_service(user_name, repo_name, service_name, params={}) _validate_presence_of user_name, repo_name, service_name _normalize_params_keys(params) event = params.delete('event') || 'push' topic = "https://github.com/#{user_name}/#{repo_name}/events/#{event}" callback = "github://#{service_name}?#{params.serialize}" subscribe(topic, callback) end