check if it is a borgpr sooner in build-filter

This commit is contained in:
Graham Christensen 2017-10-31 04:05:11 -04:00
parent d9efa4aa07
commit a996d75c4f
No known key found for this signature in database
GPG key ID: ACA1C1D120C83D5C

View file

@ -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); },