From 5e4cc8e8aed90a3f5464cbdd1656e47bf3fc810e Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 22 Feb 2015 22:41:07 +0100 Subject: look out for the github event type --- webhook.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'webhook.py') diff --git a/webhook.py b/webhook.py index 7935d81..33cae39 100755 --- a/webhook.py +++ b/webhook.py @@ -46,5 +46,9 @@ query = urllib.parse.parse_qs(query) repository = query.get('repository', []) repository = repository[0] if len(repository) else '' +# get GitHub metadata +githubEvent = os.getenv('HTTP_X_GITHUB_EVENT') +githubSignature = os.getenv('HTTP_X_HUB_SIGNATURE') + # execute the actual script -os.execlp("sudo", "sudo", "-n", "-u", "git", webhook_core, repository) +os.execlp("sudo", "sudo", "-n", "-u", "git", webhook_core, repository, str(githubEvent), str(githubSignature)) -- cgit v1.2.3