Commit 60530abc authored by nanahira's avatar nanahira

fix

parent 16f08d6f
...@@ -143,7 +143,11 @@ http.createServer(function (req, res) { ...@@ -143,7 +143,11 @@ http.createServer(function (req, res) {
}) })
req.addListener('end', function() { req.addListener('end', function() {
info = querystring.parse(info); info = querystring.parse(info);
var branch = info.ref.split("/")[2]; var ref = info.ref;
if (!ref) {
return return_error(res, "Not a push trigger.");
}
var branch = ref.split("/")[2];
if (!branch) { if (!branch) {
return return_error(res, "Invalid branch."); return return_error(res, "Invalid branch.");
} else if (branch !== hook_info.branch) { } else if (branch !== hook_info.branch) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment