add reopen example

This commit is contained in:
Bob E Moe
2019-06-20 20:13:31 +01:00
parent 396d195cab
commit 1a46b0202c
3 changed files with 27 additions and 13 deletions

11
example_reopen_label.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
include("Gitea.php");
$config=include("config.php");
$gitea=new Gitea($config['url'],$config['user'],$config['pass']);
$reopen=function($issue) use ($gitea){
$gitea->editIssue( $issue, ['state'=>'open']);
};
$gitea->forIssues('james','rc',$reopen,['state'=>'closed','labels'=>'test']);