Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R10k/issues/200 #201

Merged
merged 1 commit into from
Jun 24, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions templates/webhook.bin.erb
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ class Server < Sinatra::Base
$logger.info("authenticated: #{$config['user']}")
request.body.rewind # in case someone already read it

# Return success without deploying if this is a GitHub ping event
return 200 if request.env['HTTP_X_GITHUB_EVENT'] == 'ping'

# Check if content type is x-www-form-urlencoded
if request.content_type.to_s.downcase.eql?('application/x-www-form-urlencoded')
decoded = CGI::unescape(request.body.read).gsub(/^payload\=/,'')
Expand Down