Software /
code /
prosody-modules
Comparison
mod_pubsub_github/mod_pubsub_github.lua @ 1620:754d97ba333d
mod_pubsub_github: Update for new Github webhook format
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 27 Feb 2015 16:42:36 +0000 |
parent | 1343:7dbde05b48a9 |
child | 3263:a65f4297264b |
comparison
equal
deleted
inserted
replaced
1619:43c54a27bab2 | 1620:754d97ba333d |
---|---|
6 | 6 |
7 local pubsub_service = module:depends("pubsub").service; | 7 local pubsub_service = module:depends("pubsub").service; |
8 local node = module:get_option("github_node", "github"); | 8 local node = module:get_option("github_node", "github"); |
9 | 9 |
10 function handle_POST(event) | 10 function handle_POST(event) |
11 local data = json.decode(formdecode(event.request.body).payload); | 11 local data = json.decode(event.request.body); |
12 if not data then | 12 if not data then |
13 return "Invalid JSON. From you of all people..."; | 13 return "Invalid JSON. From you of all people..."; |
14 end | 14 end |
15 | 15 |
16 for _, commit in ipairs(data.commits) do | 16 for _, commit in ipairs(data.commits) do |