#!/usr/bin/php getIssues(['q' => 'NAG!']) as $issue) { // loop through the current issues comments foreach ($issue->getComments() as $comment) { // if the comment body matches if ('NAG!' == $comment->body) { // delete the commend $repo->deleteComment($comment); } } }