diff mod_pubsub_github/mod_pubsub_github.lua @ 3521:a200fbce0ecb

mod_pubsub_github: Add some spacing to improve readability
author Kim Alvefur <zash@zash.se>
date Sun, 31 Mar 2019 18:22:35 +0200
parents 37e89a76c7d7
children c2e038e573be
line wrap: on
line diff
--- a/mod_pubsub_github/mod_pubsub_github.lua	Sun Mar 31 18:21:22 2019 +0200
+++ b/mod_pubsub_github/mod_pubsub_github.lua	Sun Mar 31 18:22:35 2019 +0200
@@ -12,12 +12,15 @@
 };
 
 local pubsub_service = module:depends("pubsub").service;
+
+-- configuration
 local default_node = module:get_option("github_node", "github");
 local node_prefix = module:get_option_string("github_node_prefix", "github/");
 local node_mapping = module:get_option_string("github_node_mapping");
 local github_actor = module:get_option_string("github_actor") or true;
 local secret = module:get_option("github_secret");
 
+-- validation
 assert(secret, "Please set 'github_secret'");
 
 local error_mapping = {
@@ -43,6 +46,7 @@
 		module:log("debug", "Signature validation failed");
 		return 401;
 	end
+
 	local data = json.decode(request.body);
 	if not data then
 		response.status_code = 400;