Skip to content

Commit 1d8c08b

Browse files
committed
feat: Add webhook ping response
1 parent 8658ba6 commit 1d8c08b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

api/python/building-a-ci-server/server.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ def payload_pull_request(self):
3939
# do busy work...
4040
return "nothing to pull request payload" # or simple {}
4141

42+
@view_config(header="X-Github-Event:ping")
43+
def payload_push_ping(self):
44+
"""This method is responding to a webhook ping"""
45+
return {'ping': True}
46+
4247

4348
if __name__ == "__main__":
4449
config = Configurator()

0 commit comments

Comments
 (0)