standadize errors and add to cleanup

This commit is contained in:
James 2019-10-06 09:49:06 +01:00
parent a5eaa40fc6
commit c81fbc889b
2 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@
// we will then have $client and $repo available
require('setup.php');
$words=['Today!!','Overdue!!'];
$words=['Today!!','Overdue!!','Error!!'];
// loop through the issues
// we use getIssues() here rather than forIssues() (see https://git.jhodges.co.uk/jhodges/GiteaBot/issues/1)

View File

@ -44,12 +44,12 @@ foreach($issues as $issue){
try{
$rrule = new RRule($rruletxt);
}catch(Exception $e){
$result="Error in RRULE\n```plain\n".$e->getMessage()."\n\n$rruletxt\n```\n";
$result="Error!!\n\n```plain\n".$e->getMessage()."\n\n$rruletxt\n```\n";
$issue->addComment($result);
continue;
}
}else{ //couldn't extract, report error
$issue->addComment("Can't extract RRULE:");
$issue->addComment("Error!!\n\nCan't extract RRULE:");
continue;
}