aboutsummaryrefslogtreecommitdiffstats
path: root/webhook-core.py
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2015-02-22 21:23:26 +0100
committerRalf Jung <post@ralfj.de>2015-02-22 21:23:26 +0100
commitd82914054bb75574c2675649a943025e57fa8680 (patch)
treed46f5820336e117883d365030ff6314835b4bdf1 /webhook-core.py
parent6843793205d96449af070b5c7b776eaf205f5ad7 (diff)
deal with the initial "zen" message from github; fix things
Diffstat (limited to 'webhook-core.py')
-rwxr-xr-xwebhook-core.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/webhook-core.py b/webhook-core.py
index bff1137..a9418bc 100755
--- a/webhook-core.py
+++ b/webhook-core.py
@@ -38,6 +38,12 @@ if __name__ == "__main__":
# now sync this repository
data = get_github_payload()
+ if 'zen' in data:
+ # github sends this initially
+ print("Content-Type: text/plain")
+ print()
+ print("Welcome!")
+ sys.exit(0)
ref = data["ref"]
oldsha = data["before"]
newsha = data["after"]