projects
/
git-mirror.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
look out for the github event type
[git-mirror.git]
/
webhook.py
diff --git
a/webhook.py
b/webhook.py
index 7935d8126169ef09c003438d5785f9046cd024aa..33cae3974c5b34c65030c4794a9a5ffe19f00276 100755
(executable)
--- 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 ''
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
# 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)
)