script to add a comment on overdue issues
This commit is contained in:
parent
c81fbc889b
commit
33f86a21a9
19
src/overdue.php
Executable file
19
src/overdue.php
Executable 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!!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user