Permalink
Browse files

Merge pull request #822 from 56yards/master

added handling of the X-Github-Event header
  • Loading branch information...
2 parents 94486fa + e23eeb9 commit 33aaa4d65c6a9d029a043c2c8de051f3bb6044f0 @atmos atmos committed Apr 1, 2014
Showing with 6 additions and 3 deletions.
  1. +5 −3 lib/services/honbu.rb
  2. +1 −0 test/honbu_test.rb
View
@@ -3,9 +3,10 @@ class Service::Honbu < Service::HttpPost
default_events :push, :issues, :issue_comment, :commit_comment,
- :create, :delete, :pull_request,
- :gollum, :watch, :release, :fork, :member, :public, :team_add,
- :status, :deployment, :deployment_status
+ :create, :delete, :pull_request, :follow, :gollum, :fork,
+ :member, :team_add, :deployment, :deployment_status
+
+
url "http://honbu.io"
logo_url "http://honbu.io/assets/honbu-website-logo.png"
@@ -19,6 +20,7 @@ def receive_event
token = required_config_value('token')
http.headers['Authorization'] = "#{token}"
+ http.headers['X-GitHub-Event'] = event.to_s
url = "https://integrations.honbu.io/github"
View
@@ -21,6 +21,7 @@ def test_push
assert_equal env[:url].host, "integrations.honbu.io"
assert_equal env[:request_headers]['Authorization'], "#{test_token}"
+ assert_equal env[:request_headers]['X-GitHub-Event'], "push"
assert_equal 'test', body['payload']['commits'][0]['id']
assert_match 'guid-', body['guid']
assert_equal data, body['config']

0 comments on commit 33aaa4d

Please sign in to comment.