add a setDueDate function

This commit is contained in:
James 2019-09-30 09:35:34 +01:00
parent aef0c2166e
commit cd20d09279

View File

@ -30,6 +30,15 @@ class Issue extends GiteaRepoData{
return $this->request($this->url.'/comments','GET'); return $this->request($this->url.'/comments','GET');
} }
/*
* this field is handled seperatly to the others! :/
* https://github.com/go-gitea/gitea/issues/8179
*/
public function setDueDate(\DateTime $date){
$args=['due_date'=>$date->format('c')];
return $this->request($this->url.'/deadline','POST',$args);
}
public function hasLabel($label){ public function hasLabel($label){
$id=$label->id; $id=$label->id;
foreach($this->labels as $label){ foreach($this->labels as $label){