diff --git a/src/delete_labels.php b/src/delete_labels.php new file mode 100755 index 0000000..5c9df93 --- /dev/null +++ b/src/delete_labels.php @@ -0,0 +1,27 @@ +#!/bin/php +getLabelByName($name); + if($label){ //it exists + //delete it + $repo->deleteLabel($label); + } +} diff --git a/src/delete_me.php b/src/delete_me.php new file mode 100755 index 0000000..e488be4 --- /dev/null +++ b/src/delete_me.php @@ -0,0 +1,27 @@ +#!/bin/php +title=='delete me'){ + foreach($issue->labels as $label){ + $issue->removeLabel($label); + } + $issue->state='closed'; + $issue->title='deleted'; + $issue->save(); + } +}; + +//do the search and process the results +$repo->forIssues($tmp,['q'=>'delete me']); diff --git a/src/delete_nags.php b/src/delete_nags.php new file mode 100755 index 0000000..b31fe62 --- /dev/null +++ b/src/delete_nags.php @@ -0,0 +1,22 @@ +#!/bin/php +getComments() as $comment){ + if($comment->body=='NAG!'){ + $repo->deleteComment($comment); + } + } +}; + +//do the search and process the results +$repo->forIssues($tmp,['q'=>'NAG!']);