v1.2 #3

Manually merged
jhodges merged 25 commits from develop into master 2019-09-07 08:53:26 +01:00
Showing only changes of commit 9be8133616 - Show all commits

20
example/close_all.php Normal file
View File

@ -0,0 +1,20 @@
<?php
require(__DIR__.'/../bootstrap.php');
$config=require(__DIR__.'/../config.php');
//pass cmd line args
if($argc<3){
die(basename(__FILE__)." <USER> <REPO> [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();
});