update example

This commit is contained in:
James 2019-08-16 16:48:06 +01:00
parent 6123f69996
commit ed0e70898a

View File

@ -13,7 +13,7 @@ $debug = ($argc==4 && $argv[3]=='debug');
$client=new Client($config['url'],$config['user'],$config['pass'],$debug);
$repo=$client->getRepo($argv[1],$argv[2]);
//create a label
//get the test label or create if not exist
if(!$label=$repo->getLabelByName('Test')){
$label=$repo->createLabel(['name'=>'Test','color'=>'#336699']);
}
@ -26,3 +26,7 @@ $issue=$repo->createIssue([
$issue->addLabel($label);
$issue->addComment('Test comment');
$issue->save();
//change the issue body
$issue->body.=' (Edited!)';
$issue->save();