diff --git a/src/Repo.php b/src/Repo.php index 03dcfb1..dac849d 100644 --- a/src/Repo.php +++ b/src/Repo.php @@ -95,9 +95,9 @@ class Repo{ return new Issue($this,$data); } - public function addAttachment($path,$type='image/png'){ - $url="repos/{$this->user}/{$this->repo}/releases/1/assets?name=test"; - $args=['attachment'=>new \CurlFile($path, $type, 'filename.png')]; + public function addReleaseAttachment($releaseId,$path){ + $url="repos/{$this->user}/{$this->repo}/releases/$releaseId/assets?name=test"; + $args=['attachment'=>new \CurlFile($path)]; $data=$this->client->request($url,'FORM',$args); return $data; }