Software /
code /
prosody-modules
Diff
mod_pubsub_github/mod_pubsub_github.lua @ 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 |
parent | 3530:552d4944d1ca |
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