From 9be81336160b9618cc75171a009522b0f6cb7c64 Mon Sep 17 00:00:00 2001 From: James Date: Sat, 24 Aug 2019 14:31:35 +0100 Subject: [PATCH] add new close all example --- example/close_all.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 example/close_all.php diff --git a/example/close_all.php b/example/close_all.php new file mode 100644 index 0000000..dd61bed --- /dev/null +++ b/example/close_all.php @@ -0,0 +1,20 @@ + [debug]\n"); +} +$debug = ($argc==4 && $argv[3]=='debug'); + +//open connection and repo +$client=new Client($config['url'],$config['user'],$config['pass'],$debug); +$repo=$client->getRepo($argv[1],$argv[2]); + +//close all issues +$repo->forIssues(function($issue){ + $issue->state='closed'; + $issue->save(); +});