Skip to content

Commit 231c93d

Browse files
committed
Add callbacks to early exit functions
1 parent 49f91ef commit 231c93d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

jekyll-hook.js

+2
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ app.post('/hooks/jekyll/:branch', function(req, res) {
3232
// End early if not permitted account
3333
if (config.accounts.indexOf(data.owner) === -1) {
3434
console.log(data.owner + ' is not an authorized account.');
35+
if (typeof cb === 'function') cb();
3536
return;
3637
}
3738

3839
// End early if not permitted branch
3940
if (data.branch !== branch) {
4041
console.log('Not ' + branch + ' branch.');
42+
if (typeof cb === 'function') cb();
4143
return;
4244
}
4345

0 commit comments

Comments
 (0)