aboutsummaryrefslogtreecommitdiffstats
path: root/webhook.py
diff options
context:
space:
mode:
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))