use getIssues() here rather than forIssues()
This commit is contained in:
parent
a629a17a82
commit
5349642752
@ -5,11 +5,12 @@
|
|||||||
******************/
|
******************/
|
||||||
|
|
||||||
// load the config, create the connection and load the repo sepcified on the cmd line args
|
// 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');
|
require('setup.php');
|
||||||
|
|
||||||
//close all issues
|
// close all issues
|
||||||
$repo->forIssues(function($issue){
|
// 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->state='closed';
|
||||||
$issue->save();
|
$issue->save();
|
||||||
});
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user