script to add a comment on overdue issues

This commit is contained in:
James 2019-12-26 12:19:31 +00:00
parent c81fbc889b
commit 33f86a21a9

19
src/overdue.php Executable file
View File

@ -0,0 +1,19 @@
#!/usr/bin/php
<?php
/*
*/
// load the config, create the connection and load the repo sepcified on the cmd line args
// we will then have $client and $repo available
require('setup.php');
foreach($repo->getIssues() as $issue){
if( $issue->due_date ){
if( strtotime(date('Y-m-d',strtotime($issue->due_date))) < strtotime(date('Y-m-d')) ){
echo "{$issue->number}: Overdue\n";
if(!$debug){
$issue->addComment("Overdue!!");
}
}
}
}