BUGFIX: Don't hardcode release attachemnt ID
This commit is contained in:
parent
0ce51d3306
commit
ba51d4ad7d
@ -95,9 +95,9 @@ class Repo{
|
|||||||
return new Issue($this,$data);
|
return new Issue($this,$data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addAttachment($path,$type='image/png'){
|
public function addReleaseAttachment($releaseId,$path){
|
||||||
$url="repos/{$this->user}/{$this->repo}/releases/1/assets?name=test";
|
$url="repos/{$this->user}/{$this->repo}/releases/$releaseId/assets?name=test";
|
||||||
$args=['attachment'=>new \CurlFile($path, $type, 'filename.png')];
|
$args=['attachment'=>new \CurlFile($path)];
|
||||||
$data=$this->client->request($url,'FORM',$args);
|
$data=$this->client->request($url,'FORM',$args);
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user