changeset 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 1fcf3cb7bb50
children 552d4944d1ca
files mod_pubsub_github/mod_pubsub_github.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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