add debug echo

This commit is contained in:
James 2019-12-26 12:20:09 +00:00
parent 33f86a21a9
commit 51a9bcb8f4

1
src/cleanup.php Normal file → Executable file
View File

@ -15,6 +15,7 @@ $words=['Today!!','Overdue!!','Error!!'];
foreach($words as $word){ foreach($words as $word){
foreach($repo->getIssues(['q'=>$word]) as $issue){ foreach($repo->getIssues(['q'=>$word]) as $issue){
// loop through the current issues comments // loop through the current issues comments
echo "{$issue->id}: {$issue->title}\n";
foreach($issue->getComments() as $comment){ foreach($issue->getComments() as $comment){
// if the comment body matches // if the comment body matches
if(($comment->user->login=='Bot') && (strpos($comment->body,$word)!==false)){ if(($comment->user->login=='Bot') && (strpos($comment->body,$word)!==false)){