standadize errors and add to cleanup
This commit is contained in:
parent
a5eaa40fc6
commit
c81fbc889b
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user