deal with the initial "zen" message from github; fix things
[git-mirror.git] / webhook-core.py
index bff1137f884e3481913b79301d41ba0557f93dfe..a9418bc858995b08f7a1350bfdbd8db3bf62d8e7 100755 (executable)
@@ -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"]