From a996d75c4fb2415bfef58820ce796ec4218195c2 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Tue, 31 Oct 2017 04:05:11 -0400 Subject: [PATCH] check if it is a borgpr sooner in build-filter --- build-filter.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build-filter.php b/build-filter.php index b4316ad..854e7dd 100644 --- a/build-filter.php +++ b/build-filter.php @@ -32,6 +32,12 @@ function runner($msg) { return true; } + $cmt = explode(' ', strtolower($in->comment->body)); + if (!in_array('@grahamcofborg', $cmt)) { + echo "not a borgpr\n"; + return true; + } + if (!\GHE\ACL::isUserAuthorized($in->comment->user->login)) { echo "Commenter not authorized (" . $in->comment->user->login . ")\n"; return true; @@ -55,12 +61,6 @@ function runner($msg) { # return true; # } - $cmt = explode(' ', strtolower($in->comment->body)); - if (!in_array('@grahamcofborg', $cmt)) { - echo "not a borgpr\n"; - return true; - } - $cmt = explode(' ', $in->comment->body); $tokens = array_map(function($term) { return trim($term); },