BUGFIX: Don't hardcode release attachemnt ID

This commit is contained in:
James 2019-11-22 14:26:03 +00:00
parent 0ce51d3306
commit ba51d4ad7d

View File

@ -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;
}