Skip to content

Commit

Permalink
Fix logsol#26: Respond to ping event
Browse files Browse the repository at this point in the history
  • Loading branch information
kumy committed Apr 18, 2015
1 parent 6e91750 commit ee8ba92
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions GitAutoDeploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@ def getConfig(myClass):
return myClass.config

def do_POST(self):
if self.headers.getheader('x-github-event') != 'push':
event = self.headers.getheader('X-Github-Event')
if event == 'ping':
if not self.quiet:
print 'We only handle push events'
print 'Ping event received'
self.respond(204)
return
if event != 'push':
if not self.quiet:
print 'We only handle ping and push events'
self.respond(304)
return

Expand Down

0 comments on commit ee8ba92

Please sign in to comment.