X-Git-Url: https://git.ralfj.de/git-mirror.git/blobdiff_plain/d82914054bb75574c2675649a943025e57fa8680..5e4cc8e8aed90a3f5464cbdd1656e47bf3fc810e:/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))