diff mod_pubsub_github/mod_pubsub_github.lua @ 3529:6ac98c4dbbd3

mod_pubsub_github: Get event type from payload (should work with gitlab)
author Kim Alvefur <zash@zash.se>
date Sun, 31 Mar 2019 19:07:22 +0200
parents bcfd6e5bb0f5
children 552d4944d1ca
line wrap: on
line diff
--- a/mod_pubsub_github/mod_pubsub_github.lua	Sun Mar 31 19:05:48 2019 +0200
+++ b/mod_pubsub_github/mod_pubsub_github.lua	Sun Mar 31 19:07:22 2019 +0200
@@ -58,7 +58,7 @@
 		node = node_prefix .. data.repository[node_mapping];
 	end
 
-	local github_event = request.headers.x_github_event
+	local github_event = request.headers.x_github_event or data.object_kind;
 	if github_event == "push" then
 		module:log("debug", "Handling 'push' event: \n%s\n", tostring(request.body));
 	elseif github_event then