use getIssues() here rather than forIssues()

This commit is contained in:
James 2019-09-08 09:27:25 +01:00
parent a629a17a82
commit 5349642752

View File

@ -5,11 +5,12 @@
******************/
// load the config, create the connection and load the repo sepcified on the cmd line args
// we will then have $client and $repo available
// we will then have $client and $repo available
require('setup.php');
//close all issues
$repo->forIssues(function($issue){
// close all issues
// we use getIssues() here rather than forIssues() (see https://git.jhodges.co.uk/jhodges/GiteaBot/issues/1)
foreach($repo->getIssues() as $issue){
$issue->state='closed';
$issue->save();
});
}