From 5349642752e45a9f4b8326c47b019c9a0c1f431d Mon Sep 17 00:00:00 2001 From: James Date: Sun, 8 Sep 2019 09:27:25 +0100 Subject: [PATCH] use getIssues() here rather than forIssues() --- src/close_all.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/close_all.php b/src/close_all.php index ffc5f74..9f22e76 100755 --- a/src/close_all.php +++ b/src/close_all.php @@ -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(); -}); +}