diff --git a/src/cleanup.php b/src/cleanup.php new file mode 100644 index 0000000..3ce8aa9 --- /dev/null +++ b/src/cleanup.php @@ -0,0 +1,26 @@ +#!/usr/bin/php +getIssues(['q'=>$word]) as $issue){ + // loop through the current issues comments + foreach($issue->getComments() as $comment){ + // if the comment body matches + if(($comment->user->login=='Bot') && (strpos($comment->body,$word)!==false)){ + // delete the commend + $repo->deleteComment($comment); + } + } + } +}