From cd20d092790395b19026d654cb38df818b0bcb78 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 30 Sep 2019 09:35:34 +0100 Subject: [PATCH] add a setDueDate function --- src/Issue.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Issue.php b/src/Issue.php index 25078d3..9bb6f9e 100644 --- a/src/Issue.php +++ b/src/Issue.php @@ -30,6 +30,15 @@ class Issue extends GiteaRepoData{ 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){ $id=$label->id; foreach($this->labels as $label){