aboutsummaryrefslogtreecommitdiffstats
path: root/webhook.py
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2015-02-22 22:41:07 +0100
committerRalf Jung <post@ralfj.de>2015-02-22 22:41:07 +0100
commit5e4cc8e8aed90a3f5464cbdd1656e47bf3fc810e (patch)
tree761d966919be1c200cc497c4fbbd7ef51b8a89a3 /webhook.py
parentd82914054bb75574c2675649a943025e57fa8680 (diff)
look out for the github event type
Diffstat (limited to 'webhook.py')
-rwxr-xr-xwebhook.py6
1 files changed, 5 insertions, 1 deletions
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))