From 231c93dca8c899ebf9ce7d780fcad6f0fe27d7eb Mon Sep 17 00:00:00 2001 From: Dave Cole Date: Wed, 19 Jun 2013 11:41:21 -0400 Subject: Add callbacks to early exit functions --- jekyll-hook.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jekyll-hook.js b/jekyll-hook.js index b78fc59..5154fd6 100755 --- a/jekyll-hook.js +++ b/jekyll-hook.js @@ -32,12 +32,14 @@ app.post('/hooks/jekyll/:branch', function(req, res) { // End early if not permitted account if (config.accounts.indexOf(data.owner) === -1) { console.log(data.owner + ' is not an authorized account.'); + if (typeof cb === 'function') cb(); return; } // End early if not permitted branch if (data.branch !== branch) { console.log('Not ' + branch + ' branch.'); + if (typeof cb === 'function') cb(); return; } -- cgit v1.2.3