Changeset

3531:3bece2db869c

mod_pubsub_github: Assume unspecified event is 'push' if there are commits in payload
author Kim Alvefur <zash@zash.se>
date Sun, 31 Mar 2019 19:10:23 +0200
parents 3530:552d4944d1ca
children 3532:85c357b69eec
files mod_pubsub_github/mod_pubsub_github.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_pubsub_github/mod_pubsub_github.lua	Sun Mar 31 19:08:43 2019 +0200
+++ b/mod_pubsub_github/mod_pubsub_github.lua	Sun Mar 31 19:10:23 2019 +0200
@@ -59,6 +59,9 @@
 	end
 
 	local github_event = request.headers.x_github_event or data.object_kind;
+	if not github_event and data.commits then
+		github_event = "push"; -- curl?
+	end
 	module:log("debug", "Handling '%s' event: \n%s\n", github_event, tostring(request.body));
 
 	if github_event == "push" then