update example
This commit is contained in:
parent
6123f69996
commit
ed0e70898a
@ -13,7 +13,7 @@ $debug = ($argc==4 && $argv[3]=='debug');
|
|||||||
$client=new Client($config['url'],$config['user'],$config['pass'],$debug);
|
$client=new Client($config['url'],$config['user'],$config['pass'],$debug);
|
||||||
$repo=$client->getRepo($argv[1],$argv[2]);
|
$repo=$client->getRepo($argv[1],$argv[2]);
|
||||||
|
|
||||||
//create a label
|
//get the test label or create if not exist
|
||||||
if(!$label=$repo->getLabelByName('Test')){
|
if(!$label=$repo->getLabelByName('Test')){
|
||||||
$label=$repo->createLabel(['name'=>'Test','color'=>'#336699']);
|
$label=$repo->createLabel(['name'=>'Test','color'=>'#336699']);
|
||||||
}
|
}
|
||||||
@ -26,3 +26,7 @@ $issue=$repo->createIssue([
|
|||||||
$issue->addLabel($label);
|
$issue->addLabel($label);
|
||||||
$issue->addComment('Test comment');
|
$issue->addComment('Test comment');
|
||||||
$issue->save();
|
$issue->save();
|
||||||
|
|
||||||
|
//change the issue body
|
||||||
|
$issue->body.=' (Edited!)';
|
||||||
|
$issue->save();
|
||||||
|
Loading…
Reference in New Issue
Block a user