Skip to content
This repository has been archived by the owner on Jan 31, 2019. It is now read-only.

Commit

Permalink
Merge pull request #822 from 56yards/master
Browse files Browse the repository at this point in the history
added handling of the X-Github-Event header
  • Loading branch information
atmos committed Apr 1, 2014
2 parents 94486fa + e23eeb9 commit 33aaa4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/services/honbu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"

Expand Down
1 change: 1 addition & 0 deletions test/honbu_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down

0 comments on commit 33aaa4d

Please sign in to comment.